Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.Redirect not opening local file

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
0
0
CA
Hey All,

What I am trying to do works fine on my development machine. When I move it to the server however, it does not work. Maybe you can explain what I'm missing. I am storing a path ie: "C:\inetpub\.....\portable.doc" in a Session variable. I then launch a new browser window on a custom display form and redirect the page to a local file on the server. This is the code:

Dim strFile As String = "C:\inetpub\ + Session("User") + "\" + strRpt

Session("File") = strFile
Response.Write("<script language='javascript'> window.open('Display.aspx');</script>")

On initialize on the custom display page, this code exists:
Me.Response.Redirect(Session("File"))

I have verified that the file and paths are correct in all instances and they are. But all I ever see in the new browser window is that it cannot find the page selected. The standard error page. Can anyone give me some direction?
Thanks in advance
 

I am still having problems with redirecting the page to a file stored locally on the web server. Can anybody tell me what the best approach would be to allow users to view these reports as clients. Using the exact path just results in a "web page cannot be found" error message.

If you follow the logic above - my understanding is that it is not working because the page is looking on the users local hard drive for the report file, which of course, is not there, but on the server..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top