Paul Arena

How do you debug a WCF service hosted in IIS 7 in Vista

I turned on Windows Authentication under IIS/WWW Services/Security, and have set the service up for Windows Authentication in the IIS manager. I can attach to the w3wp.exe after hitting the service in a browser (https://ferrari/CommerceServices/TestService.svc) but I get "The breakpoint will currently not be hit. No symbols have been loaded for this document." Am I attaching to the right process

On a side note, is there any way to get F5 debugging support working for IIS7 hosted services

Thanks



Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Mohammad Makarechian - MSFT

Hello,

You're attaching to the right process, so it seems that the problem is just a debugger configuration issue: symbols path. Try opening the Modules window after attaching to to w3wp.exe and see the list of the assemblies loaded; it should indicate which have symbols loaded for them and which don't.

Thanks.





Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Paul Arena

The App_Code.dll doesn't have symbols loaded. I looked for a pdb file to manually load the symbols and I discovered the symbols file isn't even being created. I have the Website project in debug mode, I have set <compilation debug="true"/> in <system.web> in the Web.config file. I am using the Publish feature if that makes a difference, but I don't see the symbols file in the IIS directory or the project directory. How do I enable pdb file creation for a "WebSite" project





Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Paul Arena

By the way, I have Debug set to true in IIS 7 under Features View/.Net Compilation for the application as well.



Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Paul Arena

Can anyone verify this works for them under Vista in IIS 7



Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Richie Weldon

Hello,

If you're creating your service as a compiled assembly (.dll) in Visual Studio, then you should find the .pdb file in the <path_to_project>\bin\debug folder. If you add that path to the Debugging\Symbols option under the Tools > Options item in the menu bar, your symbols should then load when you attach to the w3wp.exe when you attempt to debug.

Hope this helps,

Richie






Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Paul Arena

Hi Richie,

Thanks for your reply. I do not currently have the service in a separate dll file, but I can certainly do so. Is structuring the project like that a requirement for the debugging symbol file to be created

Thank for the info,

Paul





Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Mohammad Makarechian - MSFT

Debugging symbols are created for any project that produces an assembly (be it an EXE or DLL) that is built using a debug (vs. release) build configuration (go to the project properties by right clicking on the project in VS) and go the Build settings. Once there, choose the debug configuration. You'll also be able to change the location of the output (where the assembly and the debug symbols will be deposited) as well, to customize it to your needs.

You shouldn't have to restructure your project, but rather change the build configuration settings.

Thanks.





Re: Windows Communication Foundation (Indigo) debugging WCF service in IIS 7

Paul Arena

Mohammad,

It was in the debug configuration the entire time. I used "new website/wcf service" which created a website project with a service in the same project. The debug configuration does not build the pdb file (presumably because it's compiled by IIS 7, but I couldn't get IIS to build a pdb file either by setting IIS' debug mode). I've switched over to holding the service code in a WCF service library project, and left the hosting info (.svc file, etc) in the website/wcf service project and that is working fine and it's generating the PDB file so I'll just stick with that configuration. So at this point I just question why the website/wcf service template would set you up for coding in a way that doesn't allow debugging. I've got what I needed in my replies though, so I probably won't monitor any further responses, but I thank you both for your support.

-Paul