Re: WSE 2.0 - The security token could not be authenticated or authorized
From: Sidd (ElCid_at_hotmail.com)
Date: 06/08/04
- Next message: munjobbi: "Custom Authentication with WSE 2.0"
- Previous message: Sidd: "Re: I AM LOSING MY MIND! The security token could not be authenticated"
- In reply to: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Next in thread: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Reply: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Messages sorted by: [ date ] [ thread ]
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
> > >
> > >
> >
> >
>
>
- Next message: munjobbi: "Custom Authentication with WSE 2.0"
- Previous message: Sidd: "Re: I AM LOSING MY MIND! The security token could not be authenticated"
- In reply to: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Next in thread: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Reply: dm_dal: "Re: WSE 2.0 - The security token could not be authenticated or authorized"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|