Debugging a WebService

  • Thread starter Thread starter Erica
  • Start date Start date
E

Erica

Hello,
I want to set a break point in the web method that I am trying to debug and
then I want to access the web method via my cell phone and have the break
point activate so I can see what is going on. How do I do this?

PS: I am using "Microsoft Visual Studio 2005 (C#)" Professional Edition.

Thanks
 
You can debug cross-host calls using IIS; setup the site / virtual in
IIS using the project root as the directory home (i.e. so that your
pages work in IIS like normal). Note the root uri to your IIS project
(e.g. "browse" in IIS and cut/paste the folder part (exclusing the
page).
In VS, use the properties page to set a custom server ("Start Options"
-> "Server"; "Use cutom server" & "Base URL", and set the uri you
noted (i.e. the IIS uri to the project root). Also set "Start action"
to "Don't open a page...".

Now set some breakpoints and hit play.

What *should* happen is that VS will compile the app, and attach the
debugger to the IIS process. Your phone should be able to call into
IIS as normal, but it should get intercepted and hit the break-points.

Marc
 
Hi,

Marc said:
You can debug cross-host calls using IIS; setup the site / virtual in
IIS using the project root as the directory home (i.e. so that your
pages work in IIS like normal). Note the root uri to your IIS project
(e.g. "browse" in IIS and cut/paste the folder part (exclusing the
page).
In VS, use the properties page to set a custom server ("Start Options"
-> "Server"; "Use cutom server" & "Base URL", and set the uri you
noted (i.e. the IIS uri to the project root). Also set "Start action"
to "Don't open a page...".

Now set some breakpoints and hit play.

What *should* happen is that VS will compile the app, and attach the
debugger to the IIS process. Your phone should be able to call into
IIS as normal, but it should get intercepted and hit the break-points.

Marc

Alternatively, you can simply attach the VS debugger to the ASPNET
process using the "Debug / Attach to process" menu. This is usually
faster than starting the service in debug mode.

Greetings,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top