I'm trying the custom soap header authentication in this example:
http://msdn2.microsoft.com/en-us/library/9z52by6a.aspx
I put the two long C# codes in a .cs file and register the module in
web.config. It seems to work. When a XML consumer pass a request with
username and password in soap header, it actually launch the
WebServiceAuthenticationEvent. I can see the user/password passed into public
WebServiceAuthenticationEvent(HttpContext context, string user, string
password)
However, it never reach the Authenticate() and Authenticate(string[] roles)
a few lines below. So in the web service, User.IsAuthenticated is always
false.
Am I missing something? I couldn't quite understand this:
// Raise the custom global.asax event.
OnAuthenticate(new WebServiceAuthenticationEvent
(context, soapUser, soapPassword));
Is that means WebServiceAuthenticationEvent code should be put into
global.asax? If so, how?
Please help. Thanks.