.NET Framework ??? ????????? ??? ?? ??? ???? ?? ??? ASP.NET-?????? ????????? ????? ? ???? ??? ????? ???????

???? ?????? ???? ??????
???? ID: 911816 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
????? ???? Microsoft .NET Framework 2.0 ?? ??? ??? ?? ????????? ?? ??? ???? ???? ???
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

Microsoft Microsoft .NET Framework 2.0 ?? ??? ?? ??????? ?? ????? ?? ?? ASP.NET-?????? ????????? ??? ?? ????? ? ???? ??? ????? ???? ??, ?? ????????? ????????? ??? ?? ??? ?? ???? ??? ?? ?? ?????? ?? ???? ??, ?? ???? ??? ???? ????? ?????? ?? ????? ???? ?? ??? ??? ????? ??????? ????????? ??? ??? ??? ???? ??? ???

???????, ?????? ??? ??? ????? ?? ???? ?? ????? ????? ??? ?? ???? ???:

????? ??????: ???????
????? ?????: W3SVC
????? ??????: ??? ????
????? ID: 1009
??????: 9/28/2005
???: 3:18:11
PM ??????????: n/a
????????: IIS-?????
?????:
????????? ??? 'DefaultAppPool' ???? ???? ???? ?? ????????? ????????? ??? ?? ?????? ?? ???? ????????? id '2548' ??? ????????? ?? ???? ?????? ??? '0xe0434f4d' ???

??? ??, ????????? ??? ??? ????? ?? ???? ?? ????? ????? ??? ?? ???? ???:

????? ??????: ??????
????? ?????: .NET ?????? 2.0 ?????? ??????????
????? ??????: ??? ????
????? ID: 5000
??????: 9/28/2005
???: 3:18:02 PM
??????????: n/a
????????: IIS-?????
?????:
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 app_web_7437ep-9, P5 0.0.0.0, P6 433b1670, P7 9, P8 P9 system.exception, P10 ????? ???

????

?? ?????? ????? ???? ?? ??????? ????? ? ???? ??? ????? ?? ??? ???????? ???? .NET Framework 2.0 ?? ??? ?? ????????? ??? ????????? ?? ??? ??? ???????? ??? ??, ????? ? ???? ??? ????? ?? ??? ???? ????? ????????? ?????? ???? ?? ??? ???

Microsoft .NET Framework 1.1 ?? Microsoft .NET Framework 1.0 ???, ?? ???????? ????? ????? ? ???? ??? ????? ?? ????? ???? ???? ??? ??? ????? ??? ???? ?? ??? ????? ???????, ?? ?? ??? ?? ??? ?? ????? ?????? ?????

ASP.NET .NET Framework 2.0 ?? ??? ?? ????????? ??? ????? ? ???? ??? ????? ?? ??? ???????? ???? ?? ????? ???? ??? ?? ?? ????? ? ???? ??? ????? ???? ??, ?? ASP.NET-?????? ????????? ????????? ??? ?? ??? ?? ???? ???

?? ??????? ?? ?? ?????? ?? ?????? ??? ????? ?? ??? ???? ???? ???? ??? ?? ?????? ?? ????? ??? ?? ??????? ???? ??? ?? ?? HttpException ???????? ?????? ????? ???? ????? ????????? ?? ?????? ???? ?? ??? ????? ?????? ?? ?????? ??? ???? ???? ???? ??? ???????, ????? ????????? ?? ?????? ???? ?? ???, ???? ??? ?????? ??????? ??? ?? ???? ????? ????? ?? ????? ?????? ?? ?????? ?? ???? ????? ? ???? ??? ????? ????????

????????

?? ?????? ?? ?? ???? ?? ???, ????? ??????? ??? ?? ?? ?? ????? ?????

???? 1

?? ????????? ??? ???? ?? ??? ????? ??????? ??? ????? ???? IHttpModule ???????? ?? ??? ????? ??? ?? ??????? ????? ??????? ??? ???? ??? ?? ?? ????? ????? ?????:
  • ?????? ??????? ?????????? ?? exceptionoccurred
  • ????? ???
  • ?????
  • ????? ?????
IHttpModule ???????? ?? ??????? ???? ?? ???, ????? ????? ?? ???? ?????

??? ?? ??? ????????? ??? ??? ?????? ?? ????? ?????? ?? ????? ????? ASP.NET 2.0.50727.0 ?? ????? ??? ????? ??????? ?? ??????? ???? ?? ???, ?? ?? ????? ? ???? ??? ????? throws ?????? ?? ??? ???? ?? ??? ThreadPool.QueueUserWorkItem ???? ?? ????? ???? ?? ?? ASP.NET ????? ?? ?????? ?????
  1. ????? ??? namedUnhandledExceptionModule.cs ????? ??? ?????
    using System;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading;
    using System.Web;
     
    namespace WebMonitor {
        public class UnhandledExceptionModule: IHttpModule {
    
            static int _unhandledExceptionCount = 0;
    
            static string _sourceName = null;
            static object _initLock = new object();
            static bool _initialized = false;
    
            public void Init(HttpApplication app) {
    
                // Do this one time for each AppDomain.
                if (!_initialized) {
                    lock (_initLock) {
                        if (!_initialized) { 
    
                            string webenginePath = Path.Combine(RuntimeEnvironment.GetRuntimeDirectory(), "webengine.dll"); 
    
                            if (!File.Exists(webenginePath)) {
                                throw new Exception(String.Format(CultureInfo.InvariantCulture,
                                                                  "Failed to locate webengine.dll at '{0}'.  This module requires .NET Framework 2.0.", 
                                                                  webenginePath));
                            } 
    
                            FileVersionInfo ver = FileVersionInfo.GetVersionInfo(webenginePath);
                            _sourceName = string.Format(CultureInfo.InvariantCulture, "ASP.NET {0}.{1}.{2}.0",
                                                        ver.FileMajorPart, ver.FileMinorPart, ver.FileBuildPart);
    
                            if (!EventLog.SourceExists(_sourceName)) {
                                throw new Exception(String.Format(CultureInfo.InvariantCulture,
                                                                  "There is no EventLog source named '{0}'. This module requires .NET Framework 2.0.", 
                                                                  _sourceName));
                            }
     
                            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException);
     
                            _initialized = true;
                        }
                    }
                }
            }
    
            public void Dispose() {
            }
    
            void OnUnhandledException(object o, UnhandledExceptionEventArgs e) {
                // Let this occur one time for each AppDomain.
                if (Interlocked.Exchange(ref _unhandledExceptionCount, 1) != 0)
                    return;
    
                StringBuilder message = new StringBuilder("\r\n\r\nUnhandledException logged by UnhandledExceptionModule.dll:\r\n\r\nappId=");
    
                string appId = (string) AppDomain.CurrentDomain.GetData(".appId");
                if (appId != null) {
                    message.Append(appId);
                }
                
    
                Exception currentException = null;
                for (currentException = (Exception)e.ExceptionObject; currentException != null; currentException = currentException.InnerException) {
                    message.AppendFormat("\r\n\r\ntype={0}\r\n\r\nmessage={1}\r\n\r\nstack=\r\n{2}\r\n\r\n",
                                         currentException.GetType().FullName, 
                                         currentException.Message,
                                         currentException.StackTrace);
                }           
    
                EventLog Log = new EventLog();
                Log.Source = _sourceName;
                Log.WriteEntry(message.ToString(), EventLogEntryType.Error);
            }
    
        }
    }
  2. Followingfolder ?? ??? UnhandledExceptionModule.cs ????? ??? ??????:
    C:\Program Files\Microsoft Visual Studio 8\VC
  3. Microsoft Visual Studio 2005 CommandPrompt ??????
  4. ?????? sn.exe -k key.snk, ?? ???? ???? thenpress.
  5. ?????? csc /t:library /r:system.web.dll,system.dll/keyfile:key.snk UnhandledExceptionModule.cs, ?? ???? ??? pressENTER.
  6. ?????? gacutil.exe /ifUnhandledExceptionModule.dll, ?? ???? ??? ENTER ??????
  7. ?????? ngen installUnhandledExceptionModule.dll, ?? ???? ??? ENTER ??????
  8. ?????? gacutil /lUnhandledExceptionModule, ?? ???? ??? thestrong ?? ??? UnhandledExceptionModule ????? ?? ??? ????????? ???? ?? ??? ENTER ??????
  9. 9. YourASP.NET-?????? ????????? ?? web. config ????? ??? ????? ??? ???????
    <add name="UnhandledExceptionModule" 
    	type="WebMonitor.UnhandledExceptionModule, <strong name>" />

???? 2

??? ?? ?? .NET Framework 1.0 ??? .NET Framework 1.1 ??? ???? ???????? ??????? ???? ?? ??? ????? ? ???? ??? ????? ???? ????????? ?????

??? ?? ??????? ???? ?? ?? ???????? ??????? ??? ???????? ??? ???? ??? ??? ?? ????? ?? ????? ? ???, ?? ????????? ?????? leak ?? ???? ?? ?? ????? ???? ???? ????

?? ???????? ??????? ?? ????? ???? ?? ???, ????? ??????? ??? ????? ?? ?? Aspnet.config ????? ??? ????? ??? ??????:
%WINDIR%\Microsoft.NET\Framework\v2.0.50727
<configuration>
    <runtime>
        <legacyUnhandledExceptionPolicy enabled="true" />
    </runtime>
</configuration>

??????

?? ??????? ??????? ?? ?????? ???

???? ???????

.NET Framework 2.0 ??? ???????? ?? ???? ??? ???? ??????? ?? ???, ????? Microsoft ?????? ??????? (MSDN) ??? ???? ?? ????:
http://msdn2.microsoft.com/en-us/netframework/aa570326.aspx

???

???? ID: 911816 - ????? ???????: 07 ??????? 2013 - ??????: 6.0
???? ???? ???? ??:
  • Microsoft .NET Framework 4.5
  • Microsoft .NET Framework 4.0
  • Microsoft .NET Framework 3.0
  • Microsoft .NET Framework 2.0
??????: 
kbtshoot kbfix kbprogramming kbprb kbmt KB911816 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:911816

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com