Folks,
I'm looking at the UserNameToken example in WSE 3 and trying to debug the
AuthenticateToken method for the CustomUsernameTokenManager class. I've seen
some posts that say you can do this by attaching to the aspnet_wp.exe process
or by simply viewing the "Modules" window before the call to the web service
is made. I've tried both with no sucess. Does anyone have any pointers on how
to debug the AuthenticateToken method. BTW, I'm running VS 2005 Final, WSE 3
Final and Win XP SP2

Signature
Anthony Yott
Pablo Cibraro - 11 Nov 2005 13:39 GMT
You have to enable the ASP debugging before attaching to the aspnet_wp.exe
process. (You must add the debug="true" attribute to the compilation element
in the web.config file)
<system.web>
<compilation defaultLanguage="c#" debug="true">
......
Regards,
Pablo Cibraro.
http://weblogs.asp.net/cibrax
http://www.lagash.com
> Folks,
>
[quoted text clipped - 10 lines]
> 3
> Final and Win XP SP2
Anthony Yott - 11 Nov 2005 13:44 GMT
Pablo,
I've done that and I can debug the actual Web Service code. I just can't
debug the AuthenticateToken method for some reason. I'm actually not sure
when that method gets fired in the grand scheme of things.

Signature
Anthony Yott
> You have to enable the ASP debugging before attaching to the aspnet_wp.exe
> process. (You must add the debug="true" attribute to the compilation element
[quoted text clipped - 23 lines]
> > 3
> > Final and Win XP SP2
mohit17@gmail.com - 11 Nov 2005 17:21 GMT
Anthony,
You can try attaching to the w3wp.exe process (.NET) from your VS.NET
IDE.
Cheers,
Mohit
Anthony Yott - 11 Nov 2005 21:00 GMT
Yes, I've attached to that process but I still cannot debug the
AuthenticateToken method but I can debug the web service. I have no clue how
too. Anyone have any other ideas?

Signature
Anthony Yott
> Anthony,
> You can try attaching to the w3wp.exe process (.NET) from your VS.NET
> IDE.
>
> Cheers,
> Mohit
Zdenek Drlik - 14 Nov 2005 07:32 GMT
Anthony Yott napsal(a):
> Folks,
>
[quoted text clipped - 5 lines]
> to debug the AuthenticateToken method. BTW, I'm running VS 2005 Final, WSE 3
> Final and Win XP SP2
I don't try it in VS 2005, but in VS 2003 with WSE 2.0 SP2 I set
breakpoint into AuthenticateToken method of my CustomTokenManager class
and then on the service project select Debug -> Start new instance from
project context menu in SolutionExplorer. After that I run the service
client the same way (from the same Solution, Debug -> Start new instance
on client project) and after calling service from the client IDE stops
at the breakpoint in AuthenticateToken. Maybe the same way you can use
in VS 2005/WSE 3.0.
Zdenek D.
Anthony Yott - 14 Nov 2005 12:51 GMT
Zdenek,
Thank you for your response. I do the following to FINALLY get it to work
1A.)Set a breakpoint immediately before the web service call
1B.) Set a breakpoint on AuthenticateToken method
2.) Run the app. App stops before web service is called
3) Attach to the aspnet_wp.exe process
4) Open the modules window from the debug menu
5) Step Into (F11) the web service call.
6) Bingo! I'm debugging the AuthenticateToken method.

Signature
Anthony Yott
> Anthony Yott napsal(a):
> > Folks,
[quoted text clipped - 17 lines]
>
> Zdenek D.
jeremy@nospamwardlawclaims.com - 09 Feb 2006 17:10 GMT
I am also unable to debug an ASP.NET Web Service which is configured for WSE
3.0. When I attempt to step into the proxy in a windows app or web form
referencing the service I get the following error:
"Unable to automatically step into the server. The remote procedure could
not be debugged. This usually indicates that debugging has not been enabled
on the server".
I am able to debug non-WSE configured wed service.
The Web.config includes debug="true" in the compilation section and the
debug verb is allowed in urlscan.
I have tryed the steps specified as the solution but have been unable to
successfully debug.
I am using Visual Studio 2005 and WSE 3.0 on a Windows 2000 machine and my
AuthenticateToken method is in a cs file located in App_Code directory.
Any help is appreciated.
> Zdenek,
>
[quoted text clipped - 29 lines]
> >
> > Zdenek D.
jeremy@nospamwardlawclaims.com - 10 Feb 2006 14:09 GMT
Problem fixed, I had an incorrect setting in my web.config file.
> I am also unable to debug an ASP.NET Web Service which is configured for WSE
> 3.0. When I attempt to step into the proxy in a windows app or web form
[quoted text clipped - 50 lines]
> > >
> > > Zdenek D.
google@fluxpc.com - 21 Feb 2006 14:49 GMT
Jeremy,
Can you elaborate on exactly which settings were incorrect?
Thanks much,
James
jeremy@nospamwardlawclaims.com - 21 Feb 2006 21:39 GMT
Below is a correct fragment from my web.config file
<securityTokenManager>
<add type="CustomUsernameTokenManager"
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
</securityTokenManager>
I had incorrectly used the name of my custom token manager class for the
localName when I should have used "UsernameToken"
Jeremy
> Jeremy,
>
[quoted text clipped - 3 lines]
>
> James