Access Denied Error.

S

Stephen Noronha

Hi,

I have created a web service on machine "X" and its using Windows
Authentication. I am creating a web application on machine "Y". I add
reference to machine "X" for calling web methods from machine "Y" by using
username and password.
but when i run the web application I get the following error and I have no
clue whatsoever.




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 43:
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.o
rg/LMWebServiceNew/Service1/GetLogin",
RequestNamespace:="http://tempuri.org/LMWebServiceNew/Service1",
ResponseNamespace:="http://tempuri.org/LMWebServiceNew/Service1",
Use:=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
_
Line 44: Public Function GetLogin() As login1
Line 45: Dim results() As Object = Me.Invoke("GetLogin", New
Object(-1) {})
Line 46: Return CType(results(0),login1)
Line 47: End Function


Source File: c:\inetpub\wwwroot\LM\LMWebProject\Test\Web
References\Server\Reference.vb Line: 45

Stack Trace:


[WebException: The request failed with HTTP status 401: Access Denied.]

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
Test.Server.Service1.GetLogin() in
c:\inetpub\wwwroot\LM\LMWebProject\Test\Web
References\Server\Reference.vb:45
Test.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\LM\LMWebProject\Test\Login.aspx.vb:60
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top