View Single Post
  #14 (permalink)  
Old 08-30-2007, 09:44 AM
suresh suresh is offline
D-Web Trainee
 
Join Date: Apr 2007
Posts: 22
suresh is on a distinguished road
Default Re: HTTP Web Response Exception - I cant able to trap.

I have exactly the same problem. I receive the 401 http error while doing
the walkthrough "Accessing an XML Web Servive using visual Basic or Visual
C#" (I did it with C#).

I tried to uncheck the "Integrated Windows Authentication" option in IIS
but it didn't work!


Here is the error I received from the Web Service:

Server Error in '/TempConvertClient2' Application.
--------------------------------------------------------------------------------

The request failed with HTTP status 401: Access Denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Net.WebException: The request failed with HTTP
status 401: Access Denied.

Source Error:


Line 35: [System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://Walkthrough/XmlWebServices/ConvertTemperature",
RequestNamespace="http://Walkthrough/XmlWebServices/", ResponseNamespace="http://Walkthrough/XmlWebServices/",
Use=System.Web.Services.Description.SoapBindingUse .Literal, ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)]
Line 36: public System.Double ConvertTemperature(System.Double dFahrenheit)
{
Line 37: object[] results = this.Invoke("ConvertTemperature",
new object[] {
Line 38: dFahrenheit});
Line 39: return ((System.Double)(results[0]));


Source File: c:\inetpub\wwwroot\TempConvertClient2\Web References\ConvertSvc\Reference.cs
Line: 37

Stack Trace:


[WebException: The request failed with HTTP status 401: Access Denied.]
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream) +1174
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String methodName,
Object[] parameters) +216
TempConvertClient2.ConvertSvc.Service1.ConvertTemp erature(Double dFahrenheit)
in c:\inetpub\wwwroot\TempConvertClient2\Web References\ConvertSvc\Reference.cs:37
TempConvertClient2.WebForm1.Button1_Click(Object sender, EventArgs e)
in c:\inetpub\wwwroot\tempconvertclient2\webform1.asp x.cs:54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(St ring
eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl,
String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1263
Reply With Quote