0

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

nldev
  • 299
  • 3
  • 15

3 Answers3

1

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
Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
  • Okay thanks, this sounds usefull, i am done for the day so i will try these things tomorrow and rate the answers! – nldev Apr 05 '11 at 14:18
0

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

BrandonZeider
  • 8,014
  • 2
  • 23
  • 20
0

Run Visual Studio as administrator

Zaragon
  • 322
  • 1
  • 13
  • It works fine in Visual studio, my question is why it does not work in IIS – nldev Apr 06 '11 at 07:24
  • ok but if you don't run VS as administrator, you can't use IIS. My project works fine with IIS without particular settings. – Zaragon Apr 06 '11 at 08:02
  • Oke, but i mean i use IIS seperatly from VS, i copy the files from the webservice to the inetpub and then launch IIS... – nldev Apr 06 '11 at 09:21
  • 1
    Okey now i debug directly in IIS from visual studio, much easier thanks! – nldev Apr 06 '11 at 09:59