Re: UserName token Access denied smart client

From: Dilip Krishnan (dkrishnanATgeniantDOTcom)
Date: 12/03/04


Date: Fri, 03 Dec 2004 07:05:41 -0800

Hello Rob,
    Theres two aspects to what you're trying to do
1. Transport level authentication
2. Web service authentication.

The situation which you described as a working version is the transport level
authentication. WSE provides default windows authenication using username
token manager. May be you could try adding the domain qualified username
to the token manager i.e. DOMAIN\user

Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com

> Hi
> Has anyone got any pointers to the following problem Im trying to use
> WSE to pass user credentials to a web service, and Im getting
> 404's.....Ive bolded below to help with reading...thanks
> (Environment SmartClient, calls proxy calls web service, on VS.NET
> 2003, WSE2, Win2k)
>
> I have a webservice whose anonymous is disabled and allows basic text
> and windows auth. I am validating against local users and groups. Its
> config file contains:
>
> <webServices>
> <soapExtensionTypes>
> <add type="Microsoft.Web.Services2.WebServicesExtension,
> Microsoft.Web.Services2,Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35"
> priority="1"
> group="0"/>
> </soapExtensionTypes>
> </webServices>
> My proxy inherits from
> Microsoft.Web.Services2.WebServicesClientProtocol
> When I call the proxy I add:
> new UsernameToken("username", "password", PasswordOption.SendPlainText
> );
> SoapContext requestContext = prox.RequestSoapContext;
> requestContext.Security.Tokens.Add(userToken);
> If I set the proxy.Credentials to the current user it works and dont
> use the usertoken I get through, if I user the security token and the
> proxy credentials then I get:
>
> An unhandled exception of type
> 'System.Web.Services.Protocols.SoapHeaderException' occurred in
> system.web.services.dll
>
> Additional information:
> Microsoft.Web.Services2.Security.SecurityFault:
> The security token could not be authenticated or authorized
> at
> Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.OnLogonUs
> erF
> ailed(UsernameToken token)
> at
> Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.LogonUser
> (Us
> ernameToken token)
> at
> Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.Authentic
> ate
> Token(UsernameToken token)
> at
> Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyTok
> en(
> SecurityToken securityToken)
> at
> Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSe
> cur
> ityToken(XmlElement element)
> at
> Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenF
> rom
> Xml(XmlElement element)
> at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement
> element, SecurityConfiguration configuration, Int32& tokenCount)
> at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement
> element)
> at
> Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(So
> apE
> nvelope envelope)
> at
> Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
> envelope)
> at
> Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(S
> oap
> ServerMessage message)
>
> Any pointers as to how to debug this or what Im doing wrong
>
> Thanks
>



Relevant Pages

  • RE: WSE 2.0, smart client, Username authentication, no x.509
    ... web services WSE 3.0 hosts them without a web server for you (read the WSE ... To perform authentication, because your database does not contain user ... the implementation William Stacey has uses Security ... > server where my web service is ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: C# SOAP Authentication to non C# web service
    ... transport security, but this would only be allowed if you were using SSL ... I also have a C# form client consuming the web service, ... fine until I added the authentication on the server, now I can not get the ... to the SOAP message posted from the C# SOAP client. ...
    (microsoft.public.dotnet.languages.csharp)
  • Error using WS-Security
    ... I am getting the following error while implementing authentication using ... "Microsoft.Web.Services2.Security.SecurityFault: The security token could ... public AuthUserToken AuthUserTokenObj; ... Web service client ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Adding security to a web service without using WSE
    ... >I need advice about adding security to a web service without using WSE, ... You have three levels of web service security: ... You can use custom SOAP headers to pass user credentials from authentication ... This is where WSE helps out the most. ...
    (microsoft.public.dotnet.framework.webservices)
  • Authentication
    ... I need to deploy Exchange Web Access, and want to know how is the best ... Is must work even if the user is behind a proxy ... When I select Integrated Windows Authentication, everything works, but not ...
    (microsoft.public.inetserver.iis.security)

Loading