ASP.NET access files on another computer shared folder

Posted by Tomas on Stack Overflow See other posts from Stack Overflow or by Tomas
Published on 2010-05-05T07:16:08Z Indexed on 2010/05/05 7:18 UTC
Read the original article Hit count: 356

Filed under:
|
|
|
|

Hello,

I have ASP.NET project which do some file access and manipulation, the methods which I use for file access are below. Now I need to access files on another server shared folder, how to do that? I easily can change file path to shared folder path but I get "can't access" error because shares are password protected. As I understand I need somehow to send credentials to remote server before executing methods below. How to do that?

FileStream("c:\MyProj\file.doc", FileMode.OpenOrCreate, FileAccess.Write)
Context.Response.TransmitFile("c:\MyProj\file.doc");

Regards, Tomas

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about files