Re: HTTP Web Response Exception - I cant able to trap. Hi all,
I created 2 web services with VB.NET. When I test them in the
automatically-generated aspx page, there's no problem.
However, when I try to call them from a program, I get the following error:
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.
--
When I turn on the trace I get this info:
Line 69:
System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.or
g/BrowseDestinations",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
parameterstyle:=system.web.services.protocols.soap parameterstyle.wrapped)>
_
Line 70: Public Function BrowseDestinations(ByVal StartDate As
String, ByVal EndDate As String, ByVal Categories As String) As
System.Data.DataSet
-->Line 71: Dim results() As Object =
Me.Invoke("BrowseDestinations", New Object() {StartDate,
EndDate,Categories})
Line 72: Return CType(results(0),System.Data.DataSet)
Line 73: End Function
--
The Line 71 raise the authentication error. This piece of code corresponds
to the proxy that VS.NET generates for the web service.
As you can see this is a security error caused by the automatically-generated
proxy and to be honest with you people, I
would be needing the 'Complete Idiot Guide' to solve it as I'm a newbie when
it comes to set access permitions in Windows 2000.
I have both anonymous access and integrated Windows auth checked for the
web directory hosting my web services.
Do i have to change wy config.web or anything like that?
Thanks in advance for any help |