|
The IIS Web Log
In the meantime let explore some part of the IIS and ASP .NET support. In order to get the detail of generated errors we can use the Event Viewer or IIS web server log. Open the Event Viewer snap-in and click the Application folder. Double-click any ASP .NET error on the right window.
The detail can be found in the Description text box. |
The error description sample reproduced as follows.
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1/ROOT
Process ID: 1820
Exception: System.Net.WebException
Message: The underlying connection was closed: An unexpected error occurred on a receive.
StackTrace: at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
at AsyncModuleCS.localhost.Service1.EndIsAuthorized(IAsyncResult asyncResult) in C:\Inetpub\wwwroot\AuthServiceCS\AsyncModuleCS\Web References\localhost\Reference.cs:line 140
at AsyncModuleCS.AsyncModule.WebServiceAsyncCallback(IAsyncResult ar) in C:\Inetpub\wwwroot\AuthServiceCS\AsyncModuleCS\AsyncModule.cs:line 104
at System.Web.Services.Protocols.WebClientAsyncResult.Complete()
at System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncException(WebClientAsyncResult client, Exception e, String method)
at System.Web.Services.Protocols.WebClientProtocol.GetResponseAsyncCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.HttpWebRequest.SetResponse(Exception E)
at System.Net.HttpWebRequest.SetAndOrProcessResponse(Object responseOrException)
at System.Net.ConnectionReturnResult.SetResponses(ConnectionReturnResult returnResult)
at System.Net.Connection.ReadComplete(Int32 bytesRead, WebExceptionStatus errorStatus)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallbackWrapper(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
InnerException: System.IO.IOException
Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
StackTrace: at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.PooledStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
InnerException: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
StackTrace: at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
For more information, see Help and Support Center at https://go.microsoft.com/fwlink/events.asp.
Every time you create an asp page in the project, the ASP .NET Configuration shortcut will be visible. It can also be accessed through the Project menu as shown below.
|
|
Keep in mind that the ASP administration data is stored in SQL database. In the real development or production the web server must be configured with SQL database. The following screenshot shows a very nice web GUI interface for the ASP .NET configuration.
Many times when there are errors during the debugging process, we need to clear the ASP .NET temporary files. The file location is shown below for Windows XP Pro SP2.
The following screenshot shows the folders and files created for the previous debugging task in the ASP .NET temporary folder.
When we browse those folders and open the temporary files, our DLL module, that is the AsyncModuleCS was loaded and run.