Question

I've got an ASP.NET site which allows users to view/open files from a shared network folder via links which call response.redirect passing in the full location of the relevant file (using a mapped drive value on appserver, not specific server name). This works fine in IE7 but now w're doing a Win7 upgrade it isn't working in IE9 (or Chrome). For IE9 it displays basic "Internet Explorer cannot display the webpage" message.

I've tried changing it to pass in the path using server instead of mapped drive but that's worse, is tries to start at root of application directory and then acts as if server is a folder within it (and displays "The page cannot be found").

The site probably shoudln't have ever been designed in this way but I need a dirty workaround, no time for complete redesign. Any ideas? If the cause is how newer browsers handle the redirect response is it possible to alter an advanced setting to mimic previous version? I've tried adding site as trusted and also compatibility view.

Sample code:

Response.Redirect("R:\SharedFolder\indexedEmail.msg"); //Where R is mapped to netshare
Was it helpful?

Solution

Try using using the file:// URL prefix. The newer browsers may not be assuming that the URL is pointing to the local file system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top