knagode
knagode

Reputation: 6125

WCF and IIS error 500 when using diagnostics

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?

Upvotes: 0

Views: 1616

Answers (3)

knagode
knagode

Reputation: 6125

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.

Upvotes: 0

Graham Clark
Graham Clark

Reputation: 12966

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.

Upvotes: 0

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364299

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.

Upvotes: 1

Related Questions