not enough permissions to do SqlConnection.Open()

From: Tom VdP (unick@_hotmail_._com_)
Date: 06/21/02


From: "Tom VdP" <unick@_hotmail_._com_>
Date: Fri, 21 Jun 2002 08:09:02 -0700


Hello,

Trying to connect to SQLServer2000.
Application: No impersonation / running under default
ASPNET-account.

Error on the Open() method:

[UnauthorizedAccessException: Access is denied.]
   System.Data.SqlClient.SqlConnection.Open()

If I change machine.config to make ASP.Net run under
SYSTEM, the connection is allowed.

SQLServer does not write an unsuccessful login in the
event-log. It is as if the ASPNET-account needs some
additional privileges to connect to the DB (running
locally). The DB is listening to both TCP & named pipes.

Ideas please... ?

Thanks,
Tom



Relevant Pages

  • Re: CreateProcessAsUser "loses" privileges, why?
    ... impersonation that happens via SSPI does not strip privilegs (since it ... while impersonation that happens by the kernel trusting itself, ... (since it does not require authentication). ... The rationale being that across a network authentication hop privileges may ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Administrator elevation via RPC fails on Vista, why?
    ... any privileges that are in the token but not enabled get stripped away ... across impersonation boundaries, so - you might try turning on all ... These two label SIDs can ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CreateProcessAsUser "loses" privileges, why?
    ... It seems like the process started via CPAU has only ... privileges are non-existent in the token of this process. ... conversation the PID of the client process to the server. ... the token from impersonation as before, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Logging, Login API and SSPI
    ... the log files would be created/written under his credentials. ... but the problem is that login API and SSPI can require ... work properly (The impersonation level does not allow resource access). ... SSPI doesn't require elevated privileges. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CreateProcessAsUser "loses" privileges, why?
    ... You can google for "non enabled privileges are stripped" in the `groups` ... > conversation the PID of the client process to the server. ... > the token from impersonation as before, ... > with the access token that I got from opening the process token via PID. ...
    (microsoft.public.win32.programmer.kernel)