|
-
Jun 2nd, 2004, 10:56 AM
#1
Thread Starter
Frenzied Member
Open a file on another server
I have a file on another server I want to open in the browser but this does not work:
Response.Redirect("\\\\ServerName\\Path\\File.pdf");
How can this be done?
Last edited by wey97; Nov 10th, 2004 at 09:40 AM.
-
Jun 2nd, 2004, 01:59 PM
#2
Thread Starter
Frenzied Member
I know it would be best if the file was in a virtual directory on the same server as the asp.net app and use Server.MapPath() but is there any other way to get access across servers?
-
Jun 4th, 2004, 09:38 AM
#3
Fanatic Member
I think you may need the full physical path.
-
Jun 4th, 2004, 09:39 AM
#4
Thread Starter
Frenzied Member
Just need to add "file://" to the start
"file://\\ServerName\\Path\\FileName"
-
Jun 4th, 2004, 10:54 AM
#5
Frenzied Member
Firstly the user trying to access the file must have access to the server on the internal network to be able to access the file directly via a browser.
If you want to serve a file from a server on your internal network to a user not on the same network (e.g. user connecting over the web) then you could use System.IO to stream the file to the browser. If this is what you want let me know and I can supply some sample code.
DJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|