Web Service Error

Feb 29 2008 12:37 PM

Hi

 
I am having some troubles to consume a webservice in development server...
 
if my webservice is in the localhost it woks fine
 
but when I deploy the webservice to my development server. And I try to consume it from my website application the following error appears:
 
 

Server Error in '/WebSCaller' Application.

The request failed with HTTP status 401: Unauthorized.

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: Unauthorized.

Source Error:

Line 49:         [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
Line 50:         public string HelloWorld() {
Line 51:             object[] results = this.Invoke("HelloWorld", new object[0]);
Line 52:             return ((string)(results[0]));
Line 53:         }

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webscaller\520a4d2d\21436a9\App_WebReferences.wpxzpwkf.0.cs    Line: 51

Stack Trace:

[WebException: The request failed with HTTP status 401: Unauthorized.]
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533199
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
   WebService01.Service.HelloWorld() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\webscaller\520a4d2d\21436a9\App_WebReferences.wpxzpwkf.0.cs:51
   _Default.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebSCaller\Default.aspx.vb:8
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Answers (1)