简体   繁体   中英

How to Debug WCF Service?

I am creating a WCF service wherein mobile devices(Iphone & Android) and websites can connect to the service. I hosted my service on IIS7 and my IDE is VS2010.

When an Iphone connects on my service and call a certain function in which I placed a break point, visual studio won't stop or toggle to the breakpoint. I've tested it using web client and there was no problem debugging and adding the breakpoint.

I used WebInvoke on my wcf service. My configuration contains this line <compilation debug="true" targetFramework="4.0" /> , both client and in the service.

Your help is greatly appreciated. Best,

When running a WCF service under IIS7, you need to attach your debugger to the w3wp.exe process, from an instance with administrative privileges. If you left the debugger running for a long time before calling the service from your phone, most likely the process was shutdown, and your debugger was no longer attached.

If that's the case, you can always modify the recycling condition settings of your application pools, so the process will remain alive for a longer time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM