views:

61

answers:

3

I have problem with WCF on IIS when using diagnostics.

When I call the service I get the following error:

System.Net.WebException: The remote server returned an error: (500) Internal Server Error..

If I remove "system.diagnostics" section I dont get error 500 but I get an error

The requested service, 'http://localhost/CustomerServiceSite/Customer.svc' could not be activated. See the server's diagnostic trace logs for more information..

Which obviously needs diagnostics to get fixed.

Any idea why diagnostics doesnt work?

+1  A: 

Check event log on web server - http 500 should be logged there. Also check that Account running your AppPool in IIS has access rights to file used for diagnostics.

Ladislav Mrnka
A: 

The diagnostics will write a trace file to disk - maybe the user account WCF/ASP.NET is running under doesn't have permissions to write the file.

Graham Clark
A: 

If I opened my service in browser (http://localhost/CustomerServiceSite/Customer.svc) I have seen the whole error.

The problem was becouse I used NHibernate and Diagnostics in wrong way. Commenting NHibernate configuration solved my problem.

knagode