401 Access Denied while accessing WSE 3.0 WebService
- From: Dev <Dev@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Sep 2005 12:21:20 -0700
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!!!
.
- Follow-Ups:
- Re: 401 Access Denied while accessing WSE 3.0 WebService
- From: Pablo Cibraro
- Re: 401 Access Denied while accessing WSE 3.0 WebService
- Prev by Date: Kerberos token creation error (LsaCallAuthenticationPackage)
- Next by Date: Re: 401 Access Denied while accessing WSE 3.0 WebService
- Previous by thread: Kerberos token creation error (LsaCallAuthenticationPackage)
- Next by thread: Re: 401 Access Denied while accessing WSE 3.0 WebService
- Index(es):