Taggs Posted December 21, 2005 Posted December 21, 2005 I have an internal web site which has a link to a batch file. But when you click the link, you get the message "Page can not be found". If I change the extension to a .BOT from .BAT the file is displayed the web browser. There is also other links to an .EXE and .REG and they work fine.My problem is I want people to be able to download the batch file to there PC.I've renamed the file to several different formats, recreated the file but still nothing.I suspect it is a setting in IIS on the server.Any ideas?Taggs
Aegis Posted December 22, 2005 Posted December 22, 2005 Tell the user to right click and use save as.
nmX.Memnoch Posted December 22, 2005 Posted December 22, 2005 That won't work either because IIS6 is blocking access to the file. It does this for any files that haven't been configured.A quick Google search says that you need to setup a MIME type for .bat files to be served by IIS6.http://www.webservertalk.com/message263612.html
Taggs Posted December 22, 2005 Author Posted December 22, 2005 Added .bat as a MIME type but still will not download. Tried several different types but still nothing!Checked/tried IIS settings for the main site and the web site.
nmX.Memnoch Posted December 22, 2005 Posted December 22, 2005 Did you add it at the web server or web site level?
InTheWayBoy Posted December 22, 2005 Posted December 22, 2005 Are you running this on 2003? Could be that annoying IE hardening component getting in the way...to remove it go to Add/Remove, then Windows Components...it's on the first list. I think that only applies to SP1 and above. Some more system info would be nice too...OS, AV, Firewall, etc...
Taggs Posted December 23, 2005 Author Posted December 23, 2005 @nmx.MemnochI've tried adding the MIME type at both levels.@InTheWayBoyI'm running W2K server SP4, Server Protect (TREND), No firewall, IIS is version 5
Taggs Posted January 4, 2006 Author Posted January 4, 2006 can anybody else throw any light on this plz?
nmX.Memnoch Posted January 4, 2006 Posted January 4, 2006 (edited) I was under the impression you were using II6 with my original reply. I now know you're using IIS5. Do you have the IIS Lockdown Tool installed? If so, do the following:Go to %SystemRot%\system32\inetsrv\URLScan\ and open URLScan.ini. Look for the following section:; Deny executables that could run on the server.bat.cmd.comComment out the .bat line so that it looks like this:; Deny executables that could run on the server; .bat.cmd.comIf you have UseAllowExtensions set to 1 then you may also have to add the extension to theee [AllowExtensions] section of the file. Edited January 4, 2006 by nmX.Memnoch
Siginet Posted January 4, 2006 Posted January 4, 2006 Why not zip up the file and then the user can extract the files after they download them.
Taggs Posted January 9, 2006 Author Posted January 9, 2006 @nmX.MemnochSorry I didn't pick up on the fact about the IIS versions earlier. It now works. Thanks
cyberpyr8 Posted January 10, 2006 Posted January 10, 2006 On my server that I load batch files from I don't have any .bat setting. However, there is a .* setup for MIME type application/octet-stream. Our server prompts the user to save or run when they click on a .bat file.
nmX.Memnoch Posted January 11, 2006 Posted January 11, 2006 The MIME types are independent of the URLScan function of the IIS Lockdown Tool. If URLScan is configured to block a file type it won't work even if you setup a MIME type for it.This is where I was getting confused with his setup. You can't install the IIS Lockdown Tool on Server 2003 / IIS6...and I originally thought he was running IIS6.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now