Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debug a c# - Webservice
Message
De
18/03/2003 18:11:02
 
 
À
18/03/2003 16:08:26
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Divers
Thread ID:
00759234
Message ID:
00767305
Vues:
18
>Rick,
>
>>>I think the main issue is that unless everything is in a single project you can't debug both the Web service and the client code... You need to run a separate instance of the Dev Environment for that.<
>
>Huh? I can debug both the client code and the WebService code from one development session. As long as I can step into the WebService, there's no problem. Did I misinterpret what you just said?
>
>~~Bonnie

You have to have the code for the web service in your current solution. If this is not the case you have to attach to the web service in order to debug it.

Debugging a Deployed XML Web Service
Sometimes, you may need to debug an XML Web service that is already deployed and running on a server. To debug a deployed and running Web service from Visual Studio .NET, you must attach to the ASP.NET worker process (aspnet_wp.exe). To attach to the ASP.NET worker process, follow the steps in this procedure:

To debug a deployed XML Web service

From the Debug menu, choose Processes.
The Processes dialog box appears. For more information, see Processes Dialog Box. The following steps are performed in this dialog box.

If the Web service is running on a remote server, select the remote machine.
Select Show System Processes.
In the Available Processes list, choose the process aspnet_wp.exe.
Click the Attach button.
In the Attach to Process dialog box, make sure Common Language Runtime is selected in Choose the program types that you want to debug.
Click OK.
At the bottom of the Processes dialog box is a drop-down list box labeled When debugging is stopped. From this list, you can choose whether to terminate or detach from the process when you stop debugging. The default setting is Detach from this process, which resumes all threads in the process when debugging stops. If you choose Terminate this process, the aspnet_wp.exe process terminates when debugging stops. Terminating the aspnet_wp.exe will affect all ASP.NET applications running on the server, so this is not something you want to do in most cases.
Click OK.
The next time the application breaks, a dialog box appears asking for the location of the application's source files. Use this dialog box to locate the source. The filename you specify in the dialog box must match the filename specified in the debug symbols (located on the Web server).

FROM: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebuggingaspnetwebservice.asp

BOb

>
>
>>>It seems that the only way I can get a WebService to debug is to set the breakpoint on the code that calls the WebService and then step into it from there. Most of the time, it doesn't seem to respect the breakpoint if you put it in the WebService code itself.
>>
>>I don't see that. If you debug it should step on the code where you put the breakpoint.
>>
>>I think the main issue is that unless everything is in a single project you can't debug both the Web service and the client code...
>>
>>You need to run a separate instance of the Dev Environment for that. You can debug only one at a time, because it's basically two separate processes running the code (unless you have a single project that uses say ASP.Net calling a Web Service in the same project).
>>
>>+++ Rick ---
>>
>>
>>>
>>>~~Bonnie
>>>
>>>
>>>>hi Guys,
>>>>how do I debug a webservice ?
>>>>in the web method
>>>>bool updateclient(dataset ds)
>>>>I receive a datase as a parmeters and then I update SQL server. I get a problem. How do I debug the webservice to view the values, locals etc. I placed a maroon circle to debug but has no effect
>>>>
>>>>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform