Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2004

Tip: Looking for answers? Try searching our database.

UsernameTokenManager is Loaded but not used

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Naeem Sarfraz - 27 Oct 2004 10:09 GMT
Ok, so I have a webservice which uses WSE2 and a custom UsernameTokenManager.

I make a call to the webservice through a windows form client and add the
Username Token to the call.

So why does the webservice fail to use my UsernameTokenManager and instead
validates the username & password against the default implementation of the
UsernameTokenManager?

I know the 'ApplicationUsernameTokenManager' is being loaded correctly
because if change the name the call to the webservice fails and reports that
it cannot find the class.

code:
namespace WebService1
{
    public class ApplicationUsernameTokenManager : UsernameTokenManager
    {
        protected override string AuthenticateToken(UsernameToken token)
        { return token.Username; }
    }
}

web.config:
 <microsoft.web.services2>
   .....
   <security>
     <securityTokenManager
type="WebService1.ApplicationUsernameTokenManager, WebService1"
xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"
qname="wsse:UsernameToken" />
   </security>
 </microsoft.web.services2
Naeem Sarfraz - 28 Oct 2004 10:23 GMT
I've solved the problem, the
xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext"  was wrong, it
should be
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

> Ok, so I have a webservice which uses WSE2 and a custom UsernameTokenManager.
>
[quoted text clipped - 29 lines]
>     </security>
>   </microsoft.web.services2

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.