C
Chey Zaga
Subject: Access Denied using Windows Authentication. WSE 2.0
When using custom authentication (using the UsernameTokenManager interface.)
I am able to log in, but can't authenticate using windows authentication.
System:
XP pro work station.
My domain login had administrative privileges on my machine.
WSE 2.0
IIS: I checked off the anonymous access on the web service virtual
directory.
I have both the client and the web service on my local machine.
Error I am getting:
System.Net.WebException: The request failed with HTTP status 401: Access
Denied. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
WebService1Client.WeblogProxy2.Service1Wse.Test() in
c:\inetpub\wwwroot\webservice1client\web
references\weblogproxy2\reference.cs:line 37 at
WebService1Client.ClientCredentialsProxy.Page_Load(Object sender, EventArgs
e) in
c:\inetpub\wwwroot\webservice1client\clientcredentialsproxy.aspx.cs:line 52
Client Code:
// Create a UsernameToken
UsernameToken token = new UsernameToken( Username, Password,,
PasswordOption.SendPlainText);
// Create an instance of the proxy
WeblogProxy2.Service1Wse proxy = new WeblogProxy2.Service1Wse();
// Add the SecurityToken to the Request
Contextproxy.RequestSoapContext.Security.Tokens.Add( token );
try
{
string xx = proxy.Test();
}
catch( Exception ex )
{
Response.Write( ex.ToString() );
}
Any help will be appreciated.
Thanks.
When using custom authentication (using the UsernameTokenManager interface.)
I am able to log in, but can't authenticate using windows authentication.
System:
XP pro work station.
My domain login had administrative privileges on my machine.
WSE 2.0
IIS: I checked off the anonymous access on the web service virtual
directory.
I have both the client and the web service on my local machine.
Error I am getting:
System.Net.WebException: The request failed with HTTP status 401: Access
Denied. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
WebService1Client.WeblogProxy2.Service1Wse.Test() in
c:\inetpub\wwwroot\webservice1client\web
references\weblogproxy2\reference.cs:line 37 at
WebService1Client.ClientCredentialsProxy.Page_Load(Object sender, EventArgs
e) in
c:\inetpub\wwwroot\webservice1client\clientcredentialsproxy.aspx.cs:line 52
Client Code:
// Create a UsernameToken
UsernameToken token = new UsernameToken( Username, Password,,
PasswordOption.SendPlainText);
// Create an instance of the proxy
WeblogProxy2.Service1Wse proxy = new WeblogProxy2.Service1Wse();
// Add the SecurityToken to the Request
Contextproxy.RequestSoapContext.Security.Tokens.Add( token );
try
{
string xx = proxy.Test();
}
catch( Exception ex )
{
Response.Write( ex.ToString() );
}
Any help will be appreciated.
Thanks.