开发者

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."

No开发者_JAVA百科w 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


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


Run Visual Studio as administrator


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜