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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Always Download File from IIS

Status
Not open for further replies.

jmikow

Programmer
Mar 27, 2003
114
0
0
US
I have a question that might be simple to answer but I have yet to figure out how to do this.

We have a website being primarily used to download .tif files for our customers. We are running into an issue when some of the clients have programs associated with the .tif files and when they click on the link it opens the file in the browser.

What we need to happen is whenever the file on the website is accessed, either through a link in an email, or a link on a website, that it always brings up the option to open/save the file to their local computer.

If anyone knows how to always have a file type be downloaded from an IIS 5.0 website, and bypass any plugins or mime types, please let me know. If this is not possible, also let me know.

Thanks,

Josh
 
If you know asp, you could try forging the mime type in the header and then redirecting to the file..?
 
Unfotunately that isn't available. We need to accomplish this by using IIS only. Due to the limitations we have we can't use asp for this project.

Any other ideas?
 
I have worked on this for a while now, and nothing I have come up with ASP wise changing the MIME types would work on this situation. You might just instruct the user to right click on the link and choose save as, or zip the images instead.

--
Ian Hoskins
 
no matter what you do the user will have the option to open the "file you want them to download" with your restrictions.

in mime you can assoc. that file type with x-msdownload to force it to prompt.. despite this they can open w/ that same dialog.

unless you can come out from under your restrictions. but this will atleast not stream right out...

look up mime types on msdn or technet.. can give you more useful info if needed

'everything you wanna be'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top