does this work?
System.IO.FileStream fs = new
System.IO.FileStream(serverFilePath,System.IO.FileMode.Open,System.IO.FileAccess.Read);
Andrew
> Hello
>
[quoted text clipped - 14 lines]
> --
> Patryk
P4trykx - 07 Aug 2007 12:39 GMT
> does this work?
> System.IO.FileStream fs = new
> System.IO.FileStream(serverFilePath,System.IO.FileMode.Open,System.IO.FileA?ccess.Read);
no, I get the same Exception
--
Patryk
Hi Patryk,
All processes run in the context of a logged-in user account. If you want to
open a file on another computer, your application must be running in the
context of a user that has permissions to open files on that machine. You
can do this with Impersonation.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
> Hello
>
[quoted text clipped - 14 lines]
> --
> Patryk
P4trykx - 07 Aug 2007 13:04 GMT
> All processes run in the context of a logged-in user account. If you want to
> open a file on another computer, your application must be running in the
> context of a user that has permissions to open files on that machine. You
> can do this with Impersonation.
Ok, so how does the explorer manage to open this file ?
--
Patryk
Aidy - 07 Aug 2007 14:18 GMT
Explorer is running as the logged on user, your asp.net code is running
under an account local to the machine that has no access rights to any other
machine on the network, so it cannot access files on shares. You can change
the account your anonymous users run as via the iis admin tools and set it
to an account with the appropriate permissions.
>> All processes run in the context of a logged-in user account. If you want
>> to
[quoted text clipped - 6 lines]
> --
> Patryk
P4trykx - 07 Aug 2007 14:46 GMT
> Explorer is running as the logged on user, your asp.net code is running
> under an account local to the machine that has no access rights to any other
> machine on the network,
But I'm logged as user12 and the same user is in web.config in
impersonate section
<identity impersonate="true" userName="user12" password="somePassowrd"/
There is no users12 on the server(comp1) with the files I want to
access. \\comp1\folder1\file.txt
--
Patryk
--
Patryk
Kevin Spencer - 08 Aug 2007 12:08 GMT
Are you logged in to a domain (Active Directory) account?

Signature
HTH,
Kevin Spencer
Microsoft MVP
Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
>> Explorer is running as the logged on user, your asp.net code is running
>> under an account local to the machine that has no access rights to any
[quoted text clipped - 14 lines]
> --
> Patryk
P4trykx - 08 Aug 2007 12:47 GMT
> Are you logged in to a domain (Active Directory) account?
No, I have a local account.However computer on which I have the
share's is a aomain controller.
I suspect that explorer first tries to accesses the share using logged
user ant if this fails (no such user on the remote computer) it
connects using Guest account.
--
Patryk