ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to debug wcf service?

user-image
تم إضافة السؤال من قبل Hasan Habib , Digital Transformation Specialist , Tritech
تاريخ النشر: 2013/10/09
Rameez Ahmed Sayad
من قبل Rameez Ahmed Sayad , .Net Consultant , Proximus Luxembourg

Depending on where you host the WCF , you can debug in slightly different ways.

1)Visual Studio automatically creates proxy classes when run in Debug mode (press F5) 

2)If self hosted in WinForms , Console Apps or Windows Services , you need to run these applications in debug mode.

3) Is hosted in IIS , as described by others attach the IIS worker process to Visual Studio.

Deepak Mishra
من قبل Deepak Mishra , Lead Developer , Chevron

1.Use fault contract

http://wcftutorial.net/Fault-Contract.aspx

2.  enable excption details in app.config.

<serviceDebug includeExceptionDetailInFaults="true" />

 

Get more details on debugging WCF service in

http://msdn.microsoft.com/en-us/library/bb514135.aspx

Thomas Manavalan
من قبل Thomas Manavalan , System Developer and Business Analyst , Global Tours and Travels.

You can attach your web service application to the IIS worker process(W3WP.exe), on which the service is hosted and put break points in the web service application. Once any request to the service comes on the hosted service it will hit the break point in the web service. This method should be done only during unit testing. 

 

During system testing or system integration testing or if the application is in production one of the below methods are suggested.

 

This is a very invasive way of debugging the web service. Ideally while developing the web service you should put logs and from the stack trace in the logs you should be able to identify your issue. 

 

Other ways to debug your issues would be from the dump. Create a dump using dxdiag and read the dump using windbg. 

Samuel Eid Safwat Naguib
من قبل Samuel Eid Safwat Naguib , Technology lead ,Project Manager ,Transformation Coach , Octalpha

When running a WCF service under IIS7, you need to attach your debugger to the w3wp.exe process, from an instance with administrative privileges.

عبدالرحمن محمد صالح احمد عبيد
من قبل عبدالرحمن محمد صالح احمد عبيد , Web & Application Developer , Alkuraimi Bank

ms Visual Studio automatically creates proxy classes when run in Debug mode

Or start vistual studio prompt and write the command wcftestclient

المزيد من الأسئلة المماثلة