UserName token Access denied smart client

From: Rob Thomson (new_at_rjtt64.plus.com)
Date: 12/02/04


Date: Thu, 2 Dec 2004 22:29:11 -0000

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.OnLogonUserFailed(UsernameToken token)
   at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.LogonUser(UsernameToken token)
   at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.AuthenticateToken(UsernameToken token)
   at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(SecurityToken securityToken)
   at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)
   at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml(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(SoapEnvelope envelope)
   at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
   at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)

Any pointers as to how to debug this or what Im doing wrong

Thanks



Relevant Pages

  • Re: ipfw + trasnparent proxy
    ... I've added a note in my config file so I won't forget in the future. ... > the proxy work only if I set the proxy on the clients. ... The standard way to reply is to bottom post. ... and the first response determines which to use. ...
    (freebsd-stable)
  • Re: HttpURLConnection, Proxies and Authentication
    ... > programatically determine if my program is running through a proxy ... > server or is this a matter for a config file. ... WPAD or PAC on the network, that means that the user must have manually ...
    (comp.lang.java.programmer)
  • Re: Remoting not remoting... I dont understand why
    ... contain the information from the server, ... why must I put them into the <client> part of the client's config file while ... I should receive a proxy, ...
    (microsoft.public.dotnet.framework.remoting)
  • RE: ServicePointManger - https/proxy problem
    ... Thanks for your reply - but we solved the problem by configuring the proxy ... settings in code, rather than relying on the config file to set things. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: [SLE] vsftpd
    ... are you allowing local users to login to your box or is it an anonymous server. ... respond with your config file or this link might help out a little. ... Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com ...
    (SuSE)