How I debug a method in a Web Service . asmx

Asked

Viewed 518 times

3

I have a call in my application, which goes to a WS and executes a method and returns me. How do I debug the WS?

  • Visual Studio Remote Web Service Debugging

  • Where is this Remote Web Service Debugging option?

  • Is WS developed by you? I mean, do you have it in your Visual Studio, or is it something you don’t have access to?

  • Yes, it was developed by a colleague here at the company 6 years ago. I am now arriving at the company(2 weeks only).

2 answers

4

To debug from Visual Studio you must attach (attach) to the working process (Work Process) ASP.NET. I’m not with Visual Studio at the moment but I believe these are the following steps:

1-Start your web application calling the Webservice. Place the breakpoint somewhere before the method in which Webservice is called.

2- In the menu Debug, choosing Processes/Attach to Proccess.

inserir a descrição da imagem aqui

3-A dialog box appears displaying the processes. In the list of available processes, choose the aspnet_wp.exe or w3wp.exe process. Click the button Attach to attach the Webservice to the application process.

If you are in doubt of which process to attach, just run the application/webservice that Visual Studio itself displays a popup:

inserir a descrição da imagem aqui

At this link has the part of "Debugging a Deployed XML Web Service" explaining in more detail.

  • I will test as a response. This test cannot be done today because my manager has changed the priority, but I think this responds to my post.

1

If you have the WS source code you can debug it from Visual Studio’s own WCF Test Client, otherwise (just make a call to consume WS) you can only simulate the method call using Soap UI.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.