Re: Hybrid sql server and windows authentication

From: Joe Kaplan \(MVP - ADSI\) (
Date: 11/11/04

Date: Thu, 11 Nov 2004 14:30:16 -0600

Couldn't you just set up your process model run as the trusted SQL account
and then disable impersonation in ASP.NET? In that case, the SQL calls will
be made with the process account, but users will still log in to the site as
normal. If you needed to impersonate the current user for some reason
(local file security or something), then you could manually impersonate by
casting Content.User.Identity to a WindowsIdentity and then creating the
impersonation context from there.

Another option would be to put the db access code in a COM+ component and
run it under a different identity.

Joe K.

"Onur Gorur" <> wrote in message
>I have an web application that executes stored procedures on SQL
> Server 2000 on the backend and displays the results of this stored procs
> on a
> grid. I use integrated windows authentication on IIS, and SQL
> Server.
> Here is what I want to do:
> - When a user starts to use the application I want to get the credentials
> of
> the user. (This can be done by web.config:: <identity impersonate="true">)
> - After I get the user info, I would like to run the stored procedures
> with
> a different specific NT user's credentials, one that I will give all SQL
> Server accesses. So, I will not give any application user SQL Server
> direct
> query access but only this specific user account. (This can be done by
> impersonating this specific user in the web.config)
> I want both of this, but I could not find a way to accomplish both. One
> method I thought would be having one application and another web
> service application both running with different credentials: First, with
> the
> logged in user and second with my sql server account)
> Any other ideas? Help wanted!
> Thanks in advance
> --
> Onur Gorur, MCSD
> Microsoft Turkey
> Mid-Market Programs Manager

Relevant Pages

  • Re: I experienced exactly the same problem in my organisation.
    ... I am totally noob in SQL Server and Windows OS... ... therefor you can usually start the Agent under a domain account. ... created a new OU with a slightly different group policy. ...
  • Re: SQL account rights
    ... Please advice what is the best, suitable rights rather than domain admin ... issues, such as a server that might have IIS running on the same machine, ... applicable to SQL 2000 environment, ... files, or backups, make sure that the service account has Full ...
  • RE: MP Install issue
    ... Where in the installation are you talking about specifying the account rather ... > MPDB ERROR - CONNECTION PARAMETERS ... > SQL Server Name: servername ... > with a trusted SQL Server connection. ...
  • Re: SQL Express Fails with Hardware Error
    ... The LocalSystem account is a built-in account, ... which the SQL Service runs. ... MCSE, CCEA, Microsoft MVP - Terminal Server ... Minimum Hardware Requirement (Warning) ...
  • Re: SCCM with a remote SQL instance problems (IT IS NOT A WARNING)
    ... PreReq check is not a WARNING it is a FAILURE. ... account the run the SQL Server Service on the server, Domain Memberships, AD ...