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.
--
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
"P4trykx" <pa**********@gmail.comwrote in message
news:11**********************@b79g2000hse.googlegr oups.com...
Hello
I hace a code that opens a file on a windows share.
\\comp1\folder1\file.txt
Folder1 has full access for Everyone. I can open it from explorer on
my computer (my user isn't on set the server). However when I run this
code
FileStream file = new FileStream(serverFilePath, FileMode.Open);
from asp code as the same user as I do it form explorer I get
IOException saying that the user and password are wrong. Howto
convince C# not to login ?
--
Patryk