Re: 401 Access Denied while accessing WSE 3.0 WebService

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

what kind of authentication you have turned on in IIS? Does it allow
the ASPNET user access to the WS and all dependant resources thereof?

Hope this helps,

Marvin Smit.

On Mon, 5 Sep 2005 17:44:36 -0700, Dev <Dev@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

>Hi,
>I granted Full Control to ASPNET account to both the folder and to
>Service.asmx. Still getting the same error.
>
>Regards,
>Dev.
>
>"Pablo Cibraro" wrote:
>
>> Hi,
>> At first glance, the "ASPNET" account doesn't have file permissions on the
>> web service file (Service.asmx).
>>
>> Regards,
>> Pablo Cibraro.
>> www.lagash.com
>>
>> "Dev" <Dev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:3E408CD1-8CF9-448C-8879-23AF421F67D9@xxxxxxxxxxxxxxxx
>> > Hi,
>> > I have a simple webservice with the HelloWorld method. I have secured it
>> > with wse 3.0 usernameOverCertificateSecurity. I can access and invoke the
>> > HelloWorld method directly from the browser with the following URL:
>> > http://localhost/SLCSecureService/Service.asmx.
>> > I also created a client web app and added a web reference after enabling
>> > wse 3.0. I then created a proxy instance like this:
>> > SecureSLCService.ServiceWse proxy = new ServiceWse();
>> > When I try to invoke the HelloWorld method on the proxy like this:
>> > protected void Page_Load(object sender, EventArgs e)
>> > {
>> > Response.Write(proxy.HelloWorld());
>> > }
>> > I get the following exception:
>> > The request failed with HTTP status 401: Access Denied
>> > Source Error:
>> > Line 44:
>> > [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 45: public string HelloWorld() {
>> > Line 46: object[] results = this.Invoke("HelloWorld", new
>> > object[0]);
>> > Line 47: return ((string)(results[0]));
>> > Line 48: }
>> > Stack Trace:
>> > [WebException: The request failed with HTTP status 401: Access Denied.]
>> >
>> > System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
>> > message, WebResponse response, Stream responseStream, Boolean asyncCall)
>> > +260
>> > System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
>> > methodName, Object[] parameters) +292
>> > SecureSLCService.ServiceWse.HelloWorld() in
>> > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
>> > Files\website\e380911a\e8852beb\App_WebReferences.rjjpg7-x.0.cs:46
>> > _Default.Page_Load(Object sender, EventArgs e) in
>> > c:\Codebase\WebSite\Default.aspx.cs:20
>> > System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o,
>> > Object t, EventArgs e) +31
>> > System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
>> > EventArgs e) +68
>> > System.Web.UI.Control.OnLoad(EventArgs e) +88
>> > System.Web.UI.Control.LoadRecursive() +74
>> > System.Web.UI.Page.ProcessRequestMain(Boolean
>> > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3035
>> >
>> > Please Help!!!
>>
>>
>>
.