nldev
nldev

Reputation: 299

WCF service works in cassini, but not in IIS

I created a service that has a database connection which is working fine in Cassini, when in copy the service to the inetpub all works fine except database calls, they always return this error:

The server encountered an error processing the request. See server logs for more details."

Now i have 2 questions,

  1. I can find server logs in my C:\inetpub\logs\LogFiles\W3SVC1 folder. But are these the ones mentioned because these do not seem to contain any usefull data.

  2. How is it possible that everything works in Cassini but not in IIS?

If there are any questions about my question please go ahead!

Edit I am using Visual studio team system 2008 and IIS 7.0

Upvotes: 0

Views: 1339

Answers (3)

Zaragon
Zaragon

Reputation: 322

Run Visual Studio as administrator

Upvotes: 0

BrandonZeider
BrandonZeider

Reputation: 8152

My guess is permissions. Are you using Windows authentication?

In the case of Windows authentication: http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c7725

Upvotes: 0

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65461

This is normally a permissions problem.

If you are using defaults:

  • The connection string is using a trusted connection
  • When you run via cassini you are in the security context of your user
  • When you run via IIS you are in the security context of the identity of the application pool which is network service.

To fix it you could:

  • change the connection string
  • change the identity of the application pool
  • give network service access to your database

Upvotes: 1

Related Questions