How do I debug a WCF Web Service running in IIS

B

Bill Fuller

I am trying to attach to a WCF Web Service running in virtual directory in
my local dev box, but not sure how to do it. I tried setting a breakpoint on
the .svc and attaching to the Inetinfo process, but it doesn't break. I am
getting a SQL connection error, but the message is rather vague. The
web.config connecton string looks fine.
 
N

Nicholas Paldino [.NET/C# MVP]

Bill,

Have you seen these threads that are returned from google? They might
be of some use (I'm not sure what version of IIS you are running, so some
things are applicable, some might not be):

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1201010&SiteID=1

http://dotnet.org.za/willy/archive/2006/12/19/WCF-Debugging-_2D00_-IIS-hosted-services.aspx

You might have the best luck by creating a console host which uses your
service library and just debugging that, but of course, it will run under a
different user, which, if I had to guess in this case, is the issue in
connecting to your SQL Server.
 
S

sloan

These can help:

<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"<listeners>
<add name="sdt"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\wutemp\Host1.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>


That'll at least give you the things to google to set it up.

You can setup a HOST and a CLIENT version(entry in app.config or web.config)
as well.

You'll also want to famaliarize yourself with this program:

"C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcTraceViewer.exe"


Google
SvcTraceViewer
and that'll get you on the right path as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top