< DLL & C# Asynchronous Class Library Project | Main | VB .NET/ASP .NET Asynchronous Web Service Program Example >

 


 

 

Chapter 11 Part 11:

XML Web Services and the Network

 

 

What do we have in this chapter 11 Part 11?

  1. IIS Web Log

  2. ASP .NET Configuration

  3. ASP .NET Temporary Files

 

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 C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the Windows Event Viewer snap-in

 

The detail can be found in the Description text box.

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the selected Event properties of one of the Windows event in Windows Event Viewer

 

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 http://go.microsoft.com/fwlink/events.asp.

ASP .NET Configuration

 

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.

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the ASP .NET Configuration short cut icon in Visual Studio IDE

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the ASP .NET Configuration menu from the Project menu in the Visual Studio IDE

 

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.

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the ASP .NET Web Application Administration GUI opened in the Internet Browser

 

ASP .NET Temporary Files

 

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 C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: The ASP .NET temporary files folder 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.

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: the ASP .NET temporary folder with temporary folders example

 

When we browse those folders and open the temporary files, our DLL module, that is the AsyncModuleCS was loaded and run.

 

The C# Asynchronous Web Service Access with ASP .NET WEB Service application development Program Example: a sample of the ASP .NET temporary files for the previously run web service application

 

 

 


< DLL & C# Asynchronous Class Library Project | Main | VB .NET/ASP .NET Asynchronous Web Service Program Example >