Re: application within sps and integrated security problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Chris Botha (chris_s_botha_at_AT_h.o.t.m.a.i.l.com)
Date: 05/20/04


Date: Thu, 20 May 2004 12:19:52 -0400

If your question is how to RevertToSelf() and then how to "un-revert", then
this is how it is done:

Imports System.Security.Principal
....
....
   Dim currIdent As WindowsIdentity = WindowsIdentity.GetCurrent()
   RevertToSelf()
   ' Do your other stuff here
   ' This "un-reverts"
   currIdent.Impersonate()

"Jim Butler" <unos@companyabc.com> wrote in message
news:%231sf2gmPEHA.1388@TK2MSFTNGP09.phx.gbl...
> We have a generic data access layer which uses integrated security. We
are
> building an application to live in our portal, and we need to be able to
use
> integrated security for the connection. However, with nt authentication
> turned on, it passes our nt credentials, which creates the 3rd hop error.
> Anyway, we want to be able to access the db using the sppoolapid (or any
> other locat nt acct, like the iusr_acct)
> credentials, like sps does. I want to implement the solution the same way
> ms does. I originally thought of calling reverttoself before creating the
> connection and that works, but there is not a reverttoself back (ie
getback
> to executing as my nt account), does anyone know how we can accomplish
this
> or how ms implements this functionality
>
> tia
>
> jim butler
>
>
>



Relevant Pages

  • Re: MAPI_E_FAILONEPROVIDER during OpenMsgStore
    ... MAPIUninitialize ... RevertToSelf ... When I inspect the current logons in the exchange administrator console, I see that I have a huge number of logons still listed. ... But I haven't tried killing the threads themselves after the RevertToSelf to see if the server closes the connection when the thread goes away. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: Integrated security -whose credentials are used?
    ... 1)when you connect using integrated security what credentials are used ... it's IIS virtual directory settings which determine what credentials are ... Do i stop making use of ado connection pooling. ...
    (microsoft.public.sqlserver.security)
  • Re: Windows authentication in domain
    ... The way I understand the Integrated Security setting on a connection string, ... setting it to true or SSPI will cause SQL to use the credentials of the ... My question really is why doesn't SQL attempt to use credman ...
    (microsoft.public.sqlserver.security)