G
Guest
Hi all
I’m trying to write a file to a different sever on the same domain then the server hosting the site, but the IIS user does not have access to the other server. I thought I would use impersonation to force the specific code to impersonate a user that does have the necessary permission with the code bellow. Unfortunately This code results in an "Unable to Logon" error as the System.Security.Principal.WindowsIdentity constructor expects a Windows account token and I been unable to determine how to do this Any ideas on how to achieve this?
Private Sub PerformTask(
Dim sUsers As String = "
Dim objImpersonatedIdentity As New System.Security.Principal.WindowsIdentity("Bill"
Dim MyImpersonation As System.Security.Principal.WindowsImpersonationContext = objImpersonatedIdentity.Impersonat
sUsers = objImpersonatedIdentity.Name(
MyImpersonation.Undo(
lblOutPut.Text = sUser
End Su
Thanks in advanc
Jak
I’m trying to write a file to a different sever on the same domain then the server hosting the site, but the IIS user does not have access to the other server. I thought I would use impersonation to force the specific code to impersonate a user that does have the necessary permission with the code bellow. Unfortunately This code results in an "Unable to Logon" error as the System.Security.Principal.WindowsIdentity constructor expects a Windows account token and I been unable to determine how to do this Any ideas on how to achieve this?
Private Sub PerformTask(
Dim sUsers As String = "
Dim objImpersonatedIdentity As New System.Security.Principal.WindowsIdentity("Bill"
Dim MyImpersonation As System.Security.Principal.WindowsImpersonationContext = objImpersonatedIdentity.Impersonat
sUsers = objImpersonatedIdentity.Name(
MyImpersonation.Undo(
lblOutPut.Text = sUser
End Su
Thanks in advanc
Jak