I had a similar problem (I was exposing certain files from a network share and I would copy the file to a temp folder on the web server, do the redirect to point to the temp file / folder and delete the file after a few minutes) and the way I got around it is by reading the binary file stream and outputting the stream to the browser (with the appropriate MIME type set). The nice thing about this implementation is that there is no need to copy files around, handling the temp directory, etc.
That said, this was in ASP, not ASP.Net. Thoughts? -- Joe -----Original Message----- From: Farhan Shah [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 10:04 AM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Response.Redirect issue I am not sure what i am doing wrong, but this is kinda freaky issue: I am trying to open a PDF file in virtual folder using following: Response.Redirect("/carespring/Output/NEW.PDF") I get a blank page and when i click on refresh, it opens the file. But i do following, it opens the file from Server Path. Response.Redirect(Server.MapPath("/carespring/OutPut/NEW.PDF")) Any idea why is this happening? Thanks, Farhan You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
