Re: WSE 2.0 - The security token could not be authenticated or authorized

From: Sidd (ElCid_at_hotmail.com)
Date: 06/08/04


Date: Tue, 8 Jun 2004 15:31:18 -0700

Have you tried DOMAIN\username (case maintained) and then the appropriate
password?

Thanks,

Sidd

"dm_dal" <REMOVE_THIS.dmy75252@yahoo.com> wrote in message
news:e95gF8WTEHA.1544@TK2MSFTNGP09.phx.gbl...
> Thanks,
> I understand that the Windows Authentication is failing. I'm trying to
get
> at WHY it is failing.
>
> I'm using a local Windows account for the login and am using the correct
> Username/Password combination.
> I've tried: username, localmachine\username but both fail to
authenticate.
>
> dmy
>
> "Govind Ramanathan" <govindr@microsoft.com> wrote in message
> news:e4$lrsWTEHA.1168@TK2MSFTNGP11.phx.gbl...
> > You have implemented AuthenticateUser as a web method. When you try to
> call
> > this method your request has the Username token in the request. On the
> > service side WSE tries to validate the tokens in the request. As no
> username
> > token manger is registered the built in username token manger is called
> and
> > it does a logon user to use Windows Authentication. But this fails. So
an
> > error is returned by the WSE Pipeline itself.
> >
> > "dm_dal" <REMOVE_THIS.dmy75252@yahoo.com> wrote in message
> > news:um12GdWTEHA.1472@TK2MSFTNGP12.phx.gbl...
> > > I've seen similar post, but no real solutions. Can someone help me
> > > understand what I need to do.
> > >
> > > I'm using the example given in the "Programming with Web Services
> > > Enhancements 2.0" from the MS site. Heres the exception stack:
> > >
> > > Additional information:
Microsoft.Web.Services2.Security.SecurityFault:
> > The
> > > security token could not be authenticated or authorized
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.OnLogonUserFail
> > > ed(UsernameToken token)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.LogonUser(Usern
> > > ameToken token)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.AuthenticateTok
> > > en(UsernameToken token)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(Sec
> > > urityToken securityToken)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurity
> > > Token(XmlElement element)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml
> > > (XmlElement element)
> > > at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement
> > element)
> > > at
> > >
> >
>
Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnve
> > > lope envelope)
> > > at
Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope
> > > envelope)
> > > at
> > >
> >
>
Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapSer
> > > verMessage message)
> > >
> > >
> > > Here's the code:
> > >
> > > Web Service
> > > SimpleWseServer.ServicesMain.asmx
> > >
> > > [WebMethod]
> > > public string AuthenticateUser(string username)
> > > {
> > > SoapContext ctxt = RequestSoapContext.Current;
> > > foreach(SecurityToken token in ctxt.Security.Tokens)
> > > {
> > > if(token is UsernameToken)
> > > {
> > > UsernameToken user = (UsernameToken)token;
> > > if(user.Username==username)
> > > {
> > > if(user.Principal.IsInRole(System.Net.Dns.GetHostName() +
> @"\Kings"))
> > > return "Hello, King " + username;
> > > return "Hello, " + username;
> > > }
> > > }
> > > }
> > > return "Hello, Liar";
> > > }
> > >
> > > Client App (windows form)
> > >
> > > private void btn_login_Click(object sender, System.EventArgs e)
> > > {
> > > string username = txt_username.Text;
> > > string password = txt_password.Text;
> > > SimpleWseClient.localhost.ServicesMainWse proxy = new
> > > SimpleWseClient.localhost.ServicesMainWse();
> > > proxy.Url = "http://localhost/SimpleWseServer/ServicesMain.asmx";
> > > proxy.RequestSoapContext.Security.Tokens.Add(new
> UsernameToken(username,
> > > password, PasswordOption.SendPlainText));
> > > txt_response.Text = proxy.AuthenticateUser(username);
> > > }
> > >
> > > The username and password combination is setup on my local system and
is
> > > functioning properly. What have I missed?
> > >
> > > dmy
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Problems signing request when using Windows Authentication
    ... Even though a web-based UI may be set up for Windows authentication, ... >>> In the client I add a username token to the request. ... >>> security tokens in the request.", ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • RE: RDA Problems
    ... What username and password I need to provide if ... --It will use the device credentials passed in by the RDA or Repl ... Produced By Microsoft MimeOLE V6.00.3790.0 ... I use windows authentication, ...
    (microsoft.public.sqlserver.ce)
  • Re: OWA logon
    ... Exchange and OWA I found out that Exchange had Basic Authentication and ... Windows Authentication enabled. ... domain and username is the logon name of the user. ...
    (microsoft.public.exchange.clients)
  • Re: domain required for OWA login?
    ... Basic Authentication and Windows Authentication. ... login without the domain name, but when I logout it asks for my username ... Regarding the logout thing, make sure that the settings on the exchweb VDir ...
    (microsoft.public.exchange.setup)
  • How to get current logged in Windows username?
    ... If you use Windows authentication and deny anonymous ... to get domain log on user name. ... >browser and use the username in my app. ... >folder and network shares and the site needs thsi access ...
    (microsoft.public.dotnet.framework.aspnet)

Loading