Da, to je
security issue NTLM-a koji ne dozvoljava double hop.
Mozes to da resis ne sledeci nacin: na racunaru na kome je IIS da napravis jedan nalog koji ce da sluzi samo za citanje sadrzaja foldera, i takav identican nalog napravi na racunaru sa kojeg hoces da citas sadrzaj serovanog foldera.
Zatim pre izvrsenja metode GetFile promeni security kontekst na gore navedeni nalog preko metode Impersonate.
Code:
WindowsImpersonationContext wic;
[DllImport("advapi32.dll")]
public static extern int LogonUserA(String lpszUsername, String lpszDomain,
String lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int DuplicateToken(IntPtr hToken, int impersionationLevel,
ref IntPtr phNewToken);
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern bool CloseHandle(IntPtr handle);
protected void Impersonate(string userName, string domain, string password)
{
IntPtr token = IntPtr.Zero, tokenDupl = IntPtr.Zero;
WindowsIdentity winIdentity;
if (LogonUserA(userName, domain, password, 2, 0, ref token) != 0 &&
DuplicateToken(token, 2, ref tokenDupl) != 0)
{
winIdentity = new WindowsIdentity(tokenDupl);
if ((wic = winIdentity.Impersonate()) != null)
{
CloseHandle(tokenDupl);
CloseHandle(token);
}
}
}
I na kraju, kada ti treba tvoj kontekst pod kojim si se logovao pozovi wic.Undo(); i to je to

America national sport is called baseballs. It very similar to our sport, shurik, where we take dogs, shoot them in a field and then have a party.