Not sure how to solve this, but I would audit the remote share and see what
account is attempting to access the files. You may find that the account
attempting access is not what you think it should be.
If it is the account, use a runas on that account and attempt a straight
pull from the share. If this does not work, correct and then retest your app.
If it does not work, you have a couple of options:
NTFS issue
Active Directory issue
Kerberos issue
You need to heavily scan the machine with the share through both a success
and a failure. Figure out what is being used in each case (domain
authentication = works; Kerberos = fail, for example). Until you know
precisely what is causing the failure, you are not going to get past it.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> Hi!
>
[quoted text clipped - 16 lines]
>
> /Mathias
Mathias Erlandsson - 08 Mar 2006 06:39 GMT
Thanks for the reply.
I get the following 3 events when I audit the computer I can't access.
EventID: 576
User: The calling computer account
Category: Privilege Use
Privileges: SeChangeNotifyPrivilege
EventID: 540
User: The calling computer account
Category: Logon/Logoff
Logon Type: 3
Logon Process: Kerberos
Authentication Package: Kerberos
EventID: 540
User: NT AUTHORITY\ANONYMOUS LOGON
Category: Logon/Logoff
Logon Type: 3
Logon Process: NtLmSsp
Authentication Package: NTLM
But if I add a trusted delegation to service cifs on a computer in the same
domain I get the impersonation to work. The following 2 events are written.
EventID: 540
User: The calling computer account
Category: Logon/Logoff
Logon Type: 3
Logon Process: Kerberos
Authentication Package: Kerberos
EventID: 540
User: The username of the impersonated user
Category: Logon/Logoff
Logon Type: 3
Logon Process: Kerberos
Authentication Package: Kerberos
To get theese result I use the WindowsIdentity(UPN) impersonate in the code.
When I use ADFS for authentication the directory security on the IIS-server
has to be anonymous. That would ecplain why I get anonymous login on my
computer in the other domian. But how do I get the user to be impersonated
across domains?
/Mathias
"Cowboy (Gregory A. Beamer) - MVP" skrev:
> Not sure how to solve this, but I would audit the remote share and see what
> account is attempting to access the files. You may find that the account
[quoted text clipped - 33 lines]
> >
> > /Mathias