To obtain Web Service security context

From: Oleg Boldyrev (olboldie_at_yandex.ru)
Date: 04/18/05

  • Next message: Brian Takita: "Assembly system.data.dll security permission grant set is incompatible between appdomains."
    Date: Mon, 18 Apr 2005 19:29:52 +0400
    
    

    Hello all!

    I'd like to to impersonate the domain account a web service runs under. I
    need this to do a trusted connection to SQL Server.
    The current settings for the ASP.NET app are windows authentication and
    impersonation. So if I do a trusted connection to SQL Server it would be
    in the context of the current user which I don't want.
    I like the approach with no global impersonation setting and manual
    impersonation when nessessary, like was advised here, but that I can't
    change the current global settings because the project is not mine and far
    under way, I'm afraid to break something :-\
    I feel I would be happy if I could obtain the WindowsImpersonationContext
    for the account which runs the working process. If sombody could tell me how
    to do this. In fact, all I want to do is to change the current security
    context to that of the worker process, execute a sql query and then revert
    to the previous context.
    I don't want to explicitly set the credentials of any account. Is it
    possible?


  • Next message: Brian Takita: "Assembly system.data.dll security permission grant set is incompatible between appdomains."

    Relevant Pages

    • Re: call to xp_cmdshell from trigger problem
      ... strange even in my book because I am not sure if the impersonation process ... Does it take the domain user and create a temporary local account? ... > the SQL Server service is running. ... >> administrator group then the program runs as SQLProxy. ...
      (microsoft.public.sqlserver.server)
    • Re: SQL Server trust connection failed in Windows 2003 for ASP.NET
      ... >where to set SQL Server DB permission for machine.config account since it ... >does show in the user list when I tried to add this account to SQL Server new ... >for SQL Server trust connection without impersonation. ... >machine.config for both machines. ...
      (microsoft.public.sqlserver.connect)
    • SOLUTION: Problem connecting to sql server
      ... it is an account problem. ... Not associated with a trusted SQL Server ... go to Client Configuation properties on the client machine ... >> settings on the SQL server, ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: Connecting to SQLServer 2000 from ASP.NET
      ... but it still won't let me into SQL Server! ... > workerprocess's execute account. ... > Below are some references on ASP.NET impersonation; ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Cant Start Local Instance
      ... I am confused regarding the login settings. ... When I installed the SQL Server ... and then I have the same password set for the "sa" account, ... >>> If you get a login failure message, saying tht the password is not ...
      (microsoft.public.sqlserver.setup)