|
Subject:
|
Problem with impersonation..
|
|
Posted By:
|
joseph20
|
Post Date:
|
7/23/2008 9:07:08 AM
|
Hi All,
I have some question which is related to my scenario, web application is running on windows 2003 server (Server 1) which is a domain controller.
i have created domain users with the administrator level permission.
in the IIS only integrated windows authentication is enabled. and in web.config
<identity impersonate="false" />
and i am impersonating the user in the below code:
Public Sub Impersonation()
Dim identity As String = System.Security.Principal.WindowsIdentity.GetCurrent().Name Dim slash As Integer = identity.IndexOf("\") If slash > 0 Then Dim domain As String = identity.Substring(0, slash) Dim user As String = identity.Substring(slash + 1) identity = user + "@" + domain End If
Dim wi As New WindowsIdentity(identity) Dim wic As WindowsImpersonationContext = Nothing
Try wic = wi.Impersonate()
// for Access the files code goes here
Catch ' Prevent exceptions from propagating Finally ' Revert impersonation If wic IsNot Nothing Then wic.Undo() End If End Try End Sub
now i have another server running windows 2003 (Server 2) where i have added the domain user as a part of administrator group. now i am running the application by using domain user.
My question is :
1) what other configuration i have to do to access the files from server 2 thorugh application.
2) in this scenario do i need to use 'Kerberos authentication and delegation'.
Thanks in advance
-joseph
|
|