Discussion:
Cant't download "exe" file because of IIS version
(too old to reply)
Claude
2004-09-08 13:36:20 UTC
Permalink
Hi !

I allready posted a message today but have to define my problem again :

1) I made a Web server. It's an only one web page.
2) There's two links in this page. One on a "x.zip" file and one on a
"x.exe" file.
3) If I use a version 5.x IIS, I can download both files
4) If I use a version 6.x IIS, I can download the "zip" file but not the
"exe" file.

Where is the "protection" on IIS 6.x ? How can I modify the 6.x's IIS to
download the "exe" file ?

Thanks.

Claude.
doug
2004-09-08 13:53:45 UTC
Permalink
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.

doug
-----Original Message-----
Hi !
I allready posted a message today but have to define my
1) I made a Web server. It's an only one web page.
2) There's two links in this page. One on a "x.zip" file
and one on a
"x.exe" file.
3) If I use a version 5.x IIS, I can download both files
4) If I use a version 6.x IIS, I can download the "zip"
file but not the
"exe" file.
Where is the "protection" on IIS 6.x ? How can I modify
the 6.x's IIS to
download the "exe" file ?
Thanks.
Claude.
.
Ouatzefeuq'
2004-09-08 18:29:51 UTC
Permalink
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...

I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?

Thanks anyway :-) !!!

Claude.
Jeff Cochran
2004-09-08 20:45:05 UTC
Permalink
Post by Ouatzefeuq'
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
If it's set for executables, then it executes executables. Otherwise
they behave according to the mime type.

Jeff
David Wang [Msft]
2004-09-09 04:35:11 UTC
Permalink
Given this request:
http://myserver/download/program.exe

Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser as a
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine it --
Execute Permissions.

If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send the
contents of program.exe to the browser as a download".

Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless it
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for any
violation of this security setting. IIS6 does not allow any static content
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation of
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...

I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?

Thanks anyway :-) !!!

Claude.
Peter McLaren
2004-10-07 20:17:02 UTC
Permalink
I have a somewhat similar problem to Claude.

I have Execute Permissions on the virtual directory set to "Script Only". I
have set a MIME type for EXE to application/x-msdownload. I click on the link
to download the exe and it times out and I get a dialog box indicating:
"Internet Explorer cannot download x.exe from website. Internet Explorer was
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."

The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.

Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?

Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser as a
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine it --
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send the
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless it
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for any
violation of this security setting. IIS6 does not allow any static content
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation of
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
David Wang [Msft]
2004-10-07 23:24:24 UTC
Permalink
Hmm... on a default IIS6 install with no further configuration, .PDF and
.EXE are automatically downloadable by any browser. I suggest you:
1. Get rid of your MIME Type for .EXE. The correct one for EXE is already
defined
2. Use Netmon to sniff the network between client/server and see if IIS sent
the file to the browser or not.

If #2 shows that the EXE file is sent to the browser, start looking at IE.
If #2 shows that the EXE file is not sent to the browser, we can investigate
further. Since this scenario works for me from a default install, I suspect
you might have other software preventing proper server operation.

IE does have some code to detect download type, extension, and content-type,
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:1F4DDD53-BF93-4178-BC34-***@microsoft.com...
I have a somewhat similar problem to Claude.

I have Execute Permissions on the virtual directory set to "Script Only". I
have set a MIME type for EXE to application/x-msdownload. I click on the
link
to download the exe and it times out and I get a dialog box indicating:
"Internet Explorer cannot download x.exe from website. Internet Explorer was
not able to open this internet site. The requested site is either
unavailable
or cannot be found. Please try again later."

The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.

Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?

Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser as a
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine it --
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send the
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless it
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for any
violation of this security setting. IIS6 does not allow any static content
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation of
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
Peter McLaren
2004-10-08 16:19:02 UTC
Permalink
OK.

First, thanks for the reply!
I have Ethereal installed so I used it instead of NetMon.

I removed the MIME type for EXE. Did not perform an IISReset.Started
Ethereal. Clicked the link and still got the same error message.

The file was downloaded (I can see HTTP Continuation packets). When I looked
at the download type it was still set to the MIME type that I just removed
(application/x-msdownload).

Went back to IIS Manager and started at the top of the Web Site Hierarchy
looking for a MIME definition for EXE. There was none at the server level,
none at the Default Web Site Level, none at the Virtual directory level.

Performed an IISReset. Started Ethereal. Clicked the executable link and got
the same error message. Looked in the capture file and the file was
downloaded again, but the MIME type was still set to application/x-msdownload.

OK. I'll bite. Where is this MIME definition coming from if it is not
defined in IIS Manager? Do I have to perform a hard reboot?
Post by David Wang [Msft]
Hmm... on a default IIS6 install with no further configuration, .PDF and
1. Get rid of your MIME Type for .EXE. The correct one for EXE is already
defined
2. Use Netmon to sniff the network between client/server and see if IIS sent
the file to the browser or not.
If #2 shows that the EXE file is sent to the browser, start looking at IE.
If #2 shows that the EXE file is not sent to the browser, we can investigate
further. Since this scenario works for me from a default install, I suspect
you might have other software preventing proper server operation.
IE does have some code to detect download type, extension, and content-type,
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
I have a somewhat similar problem to Claude.
I have Execute Permissions on the virtual directory set to "Script Only". I
have set a MIME type for EXE to application/x-msdownload. I click on the link
"Internet Explorer cannot download x.exe from website. Internet Explorer was
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."
The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.
Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?
Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser as
a
Post by David Wang [Msft]
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine it --
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send the
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless
it
Post by David Wang [Msft]
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for
any
Post by David Wang [Msft]
violation of this security setting. IIS6 does not allow any static
content
Post by David Wang [Msft]
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation of
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
David Wang [Msft]
2004-10-09 01:52:43 UTC
Permalink
Changing MIME Type at the global (Websites) level requires restarting IIS to
take effect. If it was per-website then it would have taken effect
immediately.

The default MIME Type in IIS for .exe is application/octet-stream .

Since it is a static file download, it is possible that you are seeing a
response from the kernel mode cache of your earlier requests. I recommend:
NET STOP HTTP /Y & NET START W3SVC

to clear everything out and start again. I also recommend using different
machines for the server/browser.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:CC27AB2D-64C8-4680-99A9-***@microsoft.com...
OK.

First, thanks for the reply!
I have Ethereal installed so I used it instead of NetMon.

I removed the MIME type for EXE. Did not perform an IISReset.Started
Ethereal. Clicked the link and still got the same error message.

The file was downloaded (I can see HTTP Continuation packets). When I looked
at the download type it was still set to the MIME type that I just removed
(application/x-msdownload).

Went back to IIS Manager and started at the top of the Web Site Hierarchy
looking for a MIME definition for EXE. There was none at the server level,
none at the Default Web Site Level, none at the Virtual directory level.

Performed an IISReset. Started Ethereal. Clicked the executable link and got
the same error message. Looked in the capture file and the file was
downloaded again, but the MIME type was still set to
application/x-msdownload.

OK. I'll bite. Where is this MIME definition coming from if it is not
defined in IIS Manager? Do I have to perform a hard reboot?
Post by David Wang [Msft]
Hmm... on a default IIS6 install with no further configuration, .PDF and
1. Get rid of your MIME Type for .EXE. The correct one for EXE is already
defined
2. Use Netmon to sniff the network between client/server and see if IIS sent
the file to the browser or not.
If #2 shows that the EXE file is sent to the browser, start looking at IE.
If #2 shows that the EXE file is not sent to the browser, we can investigate
further. Since this scenario works for me from a default install, I suspect
you might have other software preventing proper server operation.
IE does have some code to detect download type, extension, and
content-type,
Post by David Wang [Msft]
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
I have a somewhat similar problem to Claude.
I have Execute Permissions on the virtual directory set to "Script Only". I
have set a MIME type for EXE to application/x-msdownload. I click on the link
"Internet Explorer cannot download x.exe from website. Internet Explorer was
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."
The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.
Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?
Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser as
a
Post by David Wang [Msft]
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine it --
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send the
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless
it
Post by David Wang [Msft]
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for
any
Post by David Wang [Msft]
violation of this security setting. IIS6 does not allow any static
content
Post by David Wang [Msft]
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation of
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
Peter McLaren
2004-10-12 16:01:08 UTC
Permalink
Thank you again for the information!

First, I stopped the services as you suggested (below) and restarted them. I
got the same result as before (Executbale downloaded, but I was not given an
opportunity to save the file).

So I copied the executable to another web server and tried it (using the
same browser machine). It worked beautifully.

I performed a hunt in the registry in both the problematic server and the
server which functioned and found in HCR\.exe, the (apparent) MIME type as
application/x-msdownload on both machines. Just for fun, I changed the
(apparent) MIME type in the problematic server to application/octect-stream
(after backing up the registry key first). Performed the stop and start of
services below and tried a download again. Same result. Tried an IISReset and
still got the same result. Then I restored the registry key, and performed an
IISreset. Same result

The only conclusion that I can reach is that there is some application/ISAPI
filter on the problematic server that has caused this problem to appear. The
only problem is that this problematic server is a functioning production
server for all the other applications that run on it, except for this new
application that requires the download of an executable. Yes, there are ways
to get around the download of the executable from the problematic server, but
that is not the right answer. The right answer, as far as I am concerned, is
that the download should work along with everything else.

It looks like I am going to be very busy trying to determine which
application is causing the problem.

Anyway, thanks for your help!
Post by David Wang [Msft]
Changing MIME Type at the global (Websites) level requires restarting IIS to
take effect. If it was per-website then it would have taken effect
immediately.
The default MIME Type in IIS for .exe is application/octet-stream .
Since it is a static file download, it is possible that you are seeing a
NET STOP HTTP /Y & NET START W3SVC
to clear everything out and start again. I also recommend using different
machines for the server/browser.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
OK.
First, thanks for the reply!
I have Ethereal installed so I used it instead of NetMon.
I removed the MIME type for EXE. Did not perform an IISReset.Started
Ethereal. Clicked the link and still got the same error message.
The file was downloaded (I can see HTTP Continuation packets). When I looked
at the download type it was still set to the MIME type that I just removed
(application/x-msdownload).
Went back to IIS Manager and started at the top of the Web Site Hierarchy
looking for a MIME definition for EXE. There was none at the server level,
none at the Default Web Site Level, none at the Virtual directory level.
Performed an IISReset. Started Ethereal. Clicked the executable link and got
the same error message. Looked in the capture file and the file was
downloaded again, but the MIME type was still set to
application/x-msdownload.
OK. I'll bite. Where is this MIME definition coming from if it is not
defined in IIS Manager? Do I have to perform a hard reboot?
Post by David Wang [Msft]
Hmm... on a default IIS6 install with no further configuration, .PDF and
1. Get rid of your MIME Type for .EXE. The correct one for EXE is already
defined
2. Use Netmon to sniff the network between client/server and see if IIS
sent
Post by David Wang [Msft]
the file to the browser or not.
If #2 shows that the EXE file is sent to the browser, start looking at IE.
If #2 shows that the EXE file is not sent to the browser, we can
investigate
Post by David Wang [Msft]
further. Since this scenario works for me from a default install, I
suspect
Post by David Wang [Msft]
you might have other software preventing proper server operation.
IE does have some code to detect download type, extension, and
content-type,
Post by David Wang [Msft]
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
I have a somewhat similar problem to Claude.
I have Execute Permissions on the virtual directory set to "Script Only".
I
Post by David Wang [Msft]
have set a MIME type for EXE to application/x-msdownload. I click on the link
"Internet Explorer cannot download x.exe from website. Internet Explorer
was
Post by David Wang [Msft]
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."
The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.
Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?
Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser
as
Post by David Wang [Msft]
a
Post by David Wang [Msft]
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine
it --
Post by David Wang [Msft]
Post by David Wang [Msft]
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send
the
Post by David Wang [Msft]
Post by David Wang [Msft]
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless
it
Post by David Wang [Msft]
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for
any
Post by David Wang [Msft]
violation of this security setting. IIS6 does not allow any static
content
Post by David Wang [Msft]
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation
of
Post by David Wang [Msft]
Post by David Wang [Msft]
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
David Wang [Msft]
2004-10-13 01:54:42 UTC
Permalink
To be certain:

There are two generic ways that the Content-Type header (this is what the
MIME Type controls) can be sent on a response:
1. By IIS via the static file handler
2. By non-IIS code via the dynamic handlers

If IIS sent it via the static file handler, the Content-Type would be
determined by a merge of MIME Type for a given extension from the following
locations:
1. Registry
2. IIS Global MIME Type
3. Nearest inherited MIME Type for the URL

If the content was sent/modified by other dynamic handlers, the
configuration is arbitrary. ISAPI Filters and ISAPI Extensions "filtering"
the request can both affect the Content-Type in arbitrary manners.


Here's a pragmatic way to figure out what is going on:

In the IIS Manager UI, select the exact EXE file itself, right-click
properties, select "Http Headers", and set the MIME Type for the EXE
extension right on the file itself. Close the UI to ensure the settings are
saved, then NET STOP W3SVC & NET START W3SVC on the commandline, and
finally, make a request to that EXE file and see what Content-Type is
returned.

If this response contains the MIME Type you set, then you're seeing the IIS
static file handler working to send the download (and the rest of my earlier
instructions should apply). If the response does not contain the MIME Type
you set, then we've got some other dynamic handler breaking things by
handling the download incorrectly -- and you'll need to debug further to
figure out what is doing this and get that component fixed.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:A9916518-D8BB-402E-BFD2-***@microsoft.com...
Thank you again for the information!

First, I stopped the services as you suggested (below) and restarted them. I
got the same result as before (Executbale downloaded, but I was not given an
opportunity to save the file).

So I copied the executable to another web server and tried it (using the
same browser machine). It worked beautifully.

I performed a hunt in the registry in both the problematic server and the
server which functioned and found in HCR\.exe, the (apparent) MIME type as
application/x-msdownload on both machines. Just for fun, I changed the
(apparent) MIME type in the problematic server to application/octect-stream
(after backing up the registry key first). Performed the stop and start of
services below and tried a download again. Same result. Tried an IISReset
and
still got the same result. Then I restored the registry key, and performed
an
IISreset. Same result

The only conclusion that I can reach is that there is some application/ISAPI
filter on the problematic server that has caused this problem to appear. The
only problem is that this problematic server is a functioning production
server for all the other applications that run on it, except for this new
application that requires the download of an executable. Yes, there are ways
to get around the download of the executable from the problematic server,
but
that is not the right answer. The right answer, as far as I am concerned, is
that the download should work along with everything else.

It looks like I am going to be very busy trying to determine which
application is causing the problem.

Anyway, thanks for your help!
Post by David Wang [Msft]
Changing MIME Type at the global (Websites) level requires restarting IIS to
take effect. If it was per-website then it would have taken effect
immediately.
The default MIME Type in IIS for .exe is application/octet-stream .
Since it is a static file download, it is possible that you are seeing a
NET STOP HTTP /Y & NET START W3SVC
to clear everything out and start again. I also recommend using different
machines for the server/browser.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
OK.
First, thanks for the reply!
I have Ethereal installed so I used it instead of NetMon.
I removed the MIME type for EXE. Did not perform an IISReset.Started
Ethereal. Clicked the link and still got the same error message.
The file was downloaded (I can see HTTP Continuation packets). When I looked
at the download type it was still set to the MIME type that I just removed
(application/x-msdownload).
Went back to IIS Manager and started at the top of the Web Site Hierarchy
looking for a MIME definition for EXE. There was none at the server level,
none at the Default Web Site Level, none at the Virtual directory level.
Performed an IISReset. Started Ethereal. Clicked the executable link and got
the same error message. Looked in the capture file and the file was
downloaded again, but the MIME type was still set to
application/x-msdownload.
OK. I'll bite. Where is this MIME definition coming from if it is not
defined in IIS Manager? Do I have to perform a hard reboot?
Post by David Wang [Msft]
Hmm... on a default IIS6 install with no further configuration, .PDF and
1. Get rid of your MIME Type for .EXE. The correct one for EXE is already
defined
2. Use Netmon to sniff the network between client/server and see if IIS
sent
Post by David Wang [Msft]
the file to the browser or not.
If #2 shows that the EXE file is sent to the browser, start looking at IE.
If #2 shows that the EXE file is not sent to the browser, we can
investigate
Post by David Wang [Msft]
further. Since this scenario works for me from a default install, I
suspect
Post by David Wang [Msft]
you might have other software preventing proper server operation.
IE does have some code to detect download type, extension, and
content-type,
Post by David Wang [Msft]
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
I have a somewhat similar problem to Claude.
I have Execute Permissions on the virtual directory set to "Script Only".
I
Post by David Wang [Msft]
have set a MIME type for EXE to application/x-msdownload. I click on the link
"Internet Explorer cannot download x.exe from website. Internet Explorer
was
Post by David Wang [Msft]
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."
The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.
Does anybody have any ideas as to what else I might need to do to get this
exe to download in IIS6?
Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the browser
as
Post by David Wang [Msft]
a
Post by David Wang [Msft]
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine
it --
Post by David Wang [Msft]
Post by David Wang [Msft]
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send
the
Post by David Wang [Msft]
Post by David Wang [Msft]
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated with
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server unless
it
Post by David Wang [Msft]
is allowed on the Web Service Extensions list, and IIS logs a 404.2 for
any
Post by David Wang [Msft]
violation of this security setting. IIS6 does not allow any static
content
Post by David Wang [Msft]
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any violation
of
Post by David Wang [Msft]
Post by David Wang [Msft]
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
news:096101c495ab
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the relation
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
Peter McLaren
2004-10-13 16:00:41 UTC
Permalink
Your advice has been extremely helpful!

I defined the MIME type for the specific EXE to be application/octet-stream,
stopped and started the Web Service and tried to download the application and
got the MIME type as application/octet-stream! Unfortunately, I still wasn't
given the opportunity to save the application, but it appears as though this
is an IE problem, not an IIS6 problem.

Just to test that theory, I installed Firefox and was able to save the
application without any difficulty.

Now all I have to do is figure out what setting I have to change in IE 6
that will prompt me to save the executable from our local intranet site.
Post by David Wang [Msft]
There are two generic ways that the Content-Type header (this is what the
1. By IIS via the static file handler
2. By non-IIS code via the dynamic handlers
If IIS sent it via the static file handler, the Content-Type would be
determined by a merge of MIME Type for a given extension from the following
1. Registry
2. IIS Global MIME Type
3. Nearest inherited MIME Type for the URL
If the content was sent/modified by other dynamic handlers, the
configuration is arbitrary. ISAPI Filters and ISAPI Extensions "filtering"
the request can both affect the Content-Type in arbitrary manners.
In the IIS Manager UI, select the exact EXE file itself, right-click
properties, select "Http Headers", and set the MIME Type for the EXE
extension right on the file itself. Close the UI to ensure the settings are
saved, then NET STOP W3SVC & NET START W3SVC on the commandline, and
finally, make a request to that EXE file and see what Content-Type is
returned.
If this response contains the MIME Type you set, then you're seeing the IIS
static file handler working to send the download (and the rest of my earlier
instructions should apply). If the response does not contain the MIME Type
you set, then we've got some other dynamic handler breaking things by
handling the download incorrectly -- and you'll need to debug further to
figure out what is doing this and get that component fixed.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Thank you again for the information!
First, I stopped the services as you suggested (below) and restarted them. I
got the same result as before (Executbale downloaded, but I was not given an
opportunity to save the file).
So I copied the executable to another web server and tried it (using the
same browser machine). It worked beautifully.
I performed a hunt in the registry in both the problematic server and the
server which functioned and found in HCR\.exe, the (apparent) MIME type as
application/x-msdownload on both machines. Just for fun, I changed the
(apparent) MIME type in the problematic server to application/octect-stream
(after backing up the registry key first). Performed the stop and start of
services below and tried a download again. Same result. Tried an IISReset and
still got the same result. Then I restored the registry key, and performed an
IISreset. Same result
The only conclusion that I can reach is that there is some application/ISAPI
filter on the problematic server that has caused this problem to appear. The
only problem is that this problematic server is a functioning production
server for all the other applications that run on it, except for this new
application that requires the download of an executable. Yes, there are ways
to get around the download of the executable from the problematic server, but
that is not the right answer. The right answer, as far as I am concerned, is
that the download should work along with everything else.
It looks like I am going to be very busy trying to determine which
application is causing the problem.
Anyway, thanks for your help!
Post by David Wang [Msft]
Changing MIME Type at the global (Websites) level requires restarting IIS
to
Post by David Wang [Msft]
take effect. If it was per-website then it would have taken effect
immediately.
The default MIME Type in IIS for .exe is application/octet-stream .
Since it is a static file download, it is possible that you are seeing a
response from the kernel mode cache of your earlier requests. I
NET STOP HTTP /Y & NET START W3SVC
to clear everything out and start again. I also recommend using different
machines for the server/browser.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
OK.
First, thanks for the reply!
I have Ethereal installed so I used it instead of NetMon.
I removed the MIME type for EXE. Did not perform an IISReset.Started
Ethereal. Clicked the link and still got the same error message.
The file was downloaded (I can see HTTP Continuation packets). When I
looked
Post by David Wang [Msft]
at the download type it was still set to the MIME type that I just removed
(application/x-msdownload).
Went back to IIS Manager and started at the top of the Web Site Hierarchy
looking for a MIME definition for EXE. There was none at the server level,
none at the Default Web Site Level, none at the Virtual directory level.
Performed an IISReset. Started Ethereal. Clicked the executable link and
got
Post by David Wang [Msft]
the same error message. Looked in the capture file and the file was
downloaded again, but the MIME type was still set to
application/x-msdownload.
OK. I'll bite. Where is this MIME definition coming from if it is not
defined in IIS Manager? Do I have to perform a hard reboot?
Post by David Wang [Msft]
Hmm... on a default IIS6 install with no further configuration, .PDF and
1. Get rid of your MIME Type for .EXE. The correct one for EXE is
already
Post by David Wang [Msft]
Post by David Wang [Msft]
defined
2. Use Netmon to sniff the network between client/server and see if IIS
sent
Post by David Wang [Msft]
the file to the browser or not.
If #2 shows that the EXE file is sent to the browser, start looking at
IE.
Post by David Wang [Msft]
Post by David Wang [Msft]
If #2 shows that the EXE file is not sent to the browser, we can
investigate
Post by David Wang [Msft]
further. Since this scenario works for me from a default install, I
suspect
Post by David Wang [Msft]
you might have other software preventing proper server operation.
IE does have some code to detect download type, extension, and
content-type,
Post by David Wang [Msft]
so you could be confusing it somehow.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
I have a somewhat similar problem to Claude.
I have Execute Permissions on the virtual directory set to "Script
Only".
Post by David Wang [Msft]
I
Post by David Wang [Msft]
have set a MIME type for EXE to application/x-msdownload. I click on the link
"Internet Explorer cannot download x.exe from website. Internet Explorer
was
Post by David Wang [Msft]
not able to open this internet site. The requested site is either unavailable
or cannot be found. Please try again later."
The NTFS File permissions on this x.exe file is set to Everyone/change.
There is a PDF file in the same directory that can be viewed perfectly.
Does anybody have any ideas as to what else I might need to do to get
this
Post by David Wang [Msft]
Post by David Wang [Msft]
exe to download in IIS6?
Thanks
Post by David Wang [Msft]
http://myserver/download/program.exe
Should IIS execute program.exe on the server, as a CGI, to generate a
response, or should IIS send the contents of program.exe to the
browser
Post by David Wang [Msft]
as
Post by David Wang [Msft]
a
Post by David Wang [Msft]
download? There is no way for anyone to figure out the behavior you
actually want, so IIS gives you a configuration choice to determine
it --
Post by David Wang [Msft]
Post by David Wang [Msft]
Execute Permissions.
If it is set to "Scripts and Executables", then IIS treats the URL as
"execute program.exe on the server". Otherwise, it treats it as "send
the
Post by David Wang [Msft]
Post by David Wang [Msft]
contents of program.exe to the browser as a download".
Finally, on IIS6, there are two other security measures associated
with
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by David Wang [Msft]
"executing code on the server" and "sending contents to the browser as
download". IIS6 does not allow any code to execute on the server
unless
Post by David Wang [Msft]
Post by David Wang [Msft]
it
Post by David Wang [Msft]
is allowed on the Web Service Extensions list, and IIS logs a 404.2
for
Post by David Wang [Msft]
Post by David Wang [Msft]
any
Post by David Wang [Msft]
violation of this security setting. IIS6 does not allow any static
content
Post by David Wang [Msft]
to be downloaded from the server unless it has a registered MIME Type
setting for the given extension, and IIS logs a 404.3 for any
violation
Post by David Wang [Msft]
of
Post by David Wang [Msft]
Post by David Wang [Msft]
this security setting.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
news:096101c495ab
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by doug
Ok...what does happen? Make sure you don't have the
virtual directory setup to run scripts and executables.
doug
That's right !? I set it to "Scripts" only and it works...
I don't understand why ? Do you know what it means ? What's the
relation
Post by David Wang [Msft]
Post by David Wang [Msft]
Post by David Wang [Msft]
with this option and my problem ?
Thanks anyway :-) !!!
Claude.
Yogita Manghnani [MSFT]
2004-11-11 23:10:31 UTC
Permalink
Hello,
Are you sure that the setting Executable permissions for that site in IIS
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075

Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server

*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
Peter McLaren
2004-11-12 17:34:01 UTC
Permalink
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the instructions
below:
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
application extension: executable:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension .exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in IIS
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
David Wang [Msft]
2004-11-13 01:53:19 UTC
Permalink
Wait. Your resolution is not correct. It may "work" but it's not right and
will fail under load since ASP.Net static file handler is not as robust as
IIS's.

What you did was assign ASP.Net to handle the .exe extension, and ASP.Net
will send the resource as-is since it doesn't understand .exe files. This
means that ASP.Net settings for static files will apply to the response,
which has its own configuration in the various machine.config/web.config
files applicable.

This is one way to "work", but it is a poor choice because ASP.Net static
file handler is known to not perform well under load nor for large files
(i.e. large Office documents can cause it to choke) -- so you really do NOT
want to do this. The official "fix" for this issue is to NOT use ASP.Net
for static files, so if you run into problems, you will have to do what I'm
telling you anyway -- so let's just avoid the run-around and do it correctly
the first time.


You want to make sure that .EXE is NOT scriptmapped to anything, so that the
IIS6 static file handler sends the content in accordance to the MIME Type
settings you make in IIS.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:AFBD908E-8C32-4F3F-B159-***@microsoft.com...
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the instructions
below:
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
application extension: executable:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension
.exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in IIS
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
Peter McLaren
2004-11-15 08:13:03 UTC
Permalink
This solution may not be "correct", but it is the ONLY solution that worked.
I have verified every setting in IIS6 until I am blue in the face and no
matter what I did, under no circumstances whatsoever, could I download this
executable file from my IIS6 server. Perhaps it was a function of running
Project Server on this box and running a tomcat application as well, but
regardless, those applications are mission critical while this downloading an
executable was not.

Fortunately, it is an intranet site and the task was to download a
relatively small exe file. Based on what I have learned after installing this
executable, the appropriate solution for my company is to have me create an
msi based on the installation of this application and push it out using AD,
so this particular problem is no longer an issue.

You mention an official fix. May I enquire as to what it is? I have searched
the registry and looked at all levels of Web directories in IIS6 to verify
that executables were NOT mapped to any application for the MIME type. (Right
now ASP.Net is handling executables for this directory)
Post by David Wang [Msft]
Wait. Your resolution is not correct. It may "work" but it's not right and
will fail under load since ASP.Net static file handler is not as robust as
IIS's.
What you did was assign ASP.Net to handle the .exe extension, and ASP.Net
will send the resource as-is since it doesn't understand .exe files. This
means that ASP.Net settings for static files will apply to the response,
which has its own configuration in the various machine.config/web.config
files applicable.
This is one way to "work", but it is a poor choice because ASP.Net static
file handler is known to not perform well under load nor for large files
(i.e. large Office documents can cause it to choke) -- so you really do NOT
want to do this. The official "fix" for this issue is to NOT use ASP.Net
for static files, so if you run into problems, you will have to do what I'm
telling you anyway -- so let's just avoid the run-around and do it correctly
the first time.
You want to make sure that .EXE is NOT scriptmapped to anything, so that the
IIS6 static file handler sends the content in accordance to the MIME Type
settings you make in IIS.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the instructions
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension
..exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in IIS
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Yogita Manghnani [MSFT]
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
David Wang [Msft]
2004-11-17 12:04:48 UTC
Permalink
Ah, you are running Tomcat and other ISAPI-based applications on the server?
Earlier, I was asking about custom ISAPIs being installed on the machine
because they can alter IIS behavior to be incorrect.

In particular, if this is the case, I'm not certain your MSI will do any
good. The underly problem is a conflict in behavior between some ISAPI and
what you want. Your issue is with a possible bug in that ISAPI.

My leading suspicion right now is that Tomcat's configuration has something
to do with it. Tomcat is supposed to leave static files to IIS to serve
while it handles the JSP ones -- but if that's not the case and Tomcat
botches handling the static files (like .exe), it could explain what you are
seeing. And your "solution" of scriptmapping it to ASP.Net simply told IIS
to give the file to ASP.Net (which does know how to do static file
downloads, relative to Tomcat) instead of Tomcat.

Of course, if this is the case, the best solution is to tell Tomcat to NOT
take over the .exe download, instead of asking ASP.Net to usurp the file
from Tomcat.

The "official" fix I mentioned is to not scriptmap ASP.Net to the .exe
handler (or any other static file, in fact) to support file download.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:212E2ADC-FE8B-4D13-9BFB-***@microsoft.com...
This solution may not be "correct", but it is the ONLY solution that worked.
I have verified every setting in IIS6 until I am blue in the face and no
matter what I did, under no circumstances whatsoever, could I download this
executable file from my IIS6 server. Perhaps it was a function of running
Project Server on this box and running a tomcat application as well, but
regardless, those applications are mission critical while this downloading
an
executable was not.

Fortunately, it is an intranet site and the task was to download a
relatively small exe file. Based on what I have learned after installing
this
executable, the appropriate solution for my company is to have me create an
msi based on the installation of this application and push it out using AD,
so this particular problem is no longer an issue.

You mention an official fix. May I enquire as to what it is? I have searched
the registry and looked at all levels of Web directories in IIS6 to verify
that executables were NOT mapped to any application for the MIME type.
(Right
now ASP.Net is handling executables for this directory)
Post by David Wang [Msft]
Wait. Your resolution is not correct. It may "work" but it's not right and
will fail under load since ASP.Net static file handler is not as robust as
IIS's.
What you did was assign ASP.Net to handle the .exe extension, and ASP.Net
will send the resource as-is since it doesn't understand .exe files. This
means that ASP.Net settings for static files will apply to the response,
which has its own configuration in the various machine.config/web.config
files applicable.
This is one way to "work", but it is a poor choice because ASP.Net static
file handler is known to not perform well under load nor for large files
(i.e. large Office documents can cause it to choke) -- so you really do NOT
want to do this. The official "fix" for this issue is to NOT use ASP.Net
for static files, so if you run into problems, you will have to do what I'm
telling you anyway -- so let's just avoid the run-around and do it correctly
the first time.
You want to make sure that .EXE is NOT scriptmapped to anything, so that the
IIS6 static file handler sends the content in accordance to the MIME Type
settings you make in IIS.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the instructions
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension
..exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in IIS
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Yogita Manghnani [MSFT]
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
Peter McLaren
2004-11-18 05:16:02 UTC
Permalink
As far as I can tell, we are only running Tomcat as an ISAPI application.
Unless Microsoft Project Server is an ISAPI application as well?

The MSI will be based on the results of the installation of the exe that
everyone would have downloaded in the first place. The issue is with the
installation process on a workstation. It is really ugly and requires a
number of custom registry tweaks that need to be made by hand. There is
absolutely no way on the face of this earth that I am going to allow 70 odd
people to screw this up 70 different ways. I am going to get it right with my
controlled installation and push it out using AD. What I am saying is that I
don't want my staff to download the straight exe and try to install that way
- it is far too error prone. I am going to take off the ASP.Net script
mapping just to prevent them from trying to download it. And I am going to
leave Tomcat configured just the way it is so that they CAN't download this
executable.

If it turns out that I need to download another exe from this IIS server, I
will re-evaluate the Tomcat application configuration.
Post by David Wang [Msft]
Ah, you are running Tomcat and other ISAPI-based applications on the server?
Earlier, I was asking about custom ISAPIs being installed on the machine
because they can alter IIS behavior to be incorrect.
In particular, if this is the case, I'm not certain your MSI will do any
good. The underly problem is a conflict in behavior between some ISAPI and
what you want. Your issue is with a possible bug in that ISAPI.
My leading suspicion right now is that Tomcat's configuration has something
to do with it. Tomcat is supposed to leave static files to IIS to serve
while it handles the JSP ones -- but if that's not the case and Tomcat
botches handling the static files (like .exe), it could explain what you are
seeing. And your "solution" of scriptmapping it to ASP.Net simply told IIS
to give the file to ASP.Net (which does know how to do static file
downloads, relative to Tomcat) instead of Tomcat.
Of course, if this is the case, the best solution is to tell Tomcat to NOT
take over the .exe download, instead of asking ASP.Net to usurp the file
from Tomcat.
The "official" fix I mentioned is to not scriptmap ASP.Net to the .exe
handler (or any other static file, in fact) to support file download.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
This solution may not be "correct", but it is the ONLY solution that worked.
I have verified every setting in IIS6 until I am blue in the face and no
matter what I did, under no circumstances whatsoever, could I download this
executable file from my IIS6 server. Perhaps it was a function of running
Project Server on this box and running a tomcat application as well, but
regardless, those applications are mission critical while this downloading an
executable was not.
Fortunately, it is an intranet site and the task was to download a
relatively small exe file. Based on what I have learned after installing this
executable, the appropriate solution for my company is to have me create an
msi based on the installation of this application and push it out using AD,
so this particular problem is no longer an issue.
You mention an official fix. May I enquire as to what it is? I have searched
the registry and looked at all levels of Web directories in IIS6 to verify
that executables were NOT mapped to any application for the MIME type. (Right
now ASP.Net is handling executables for this directory)
Post by David Wang [Msft]
Wait. Your resolution is not correct. It may "work" but it's not right
and
Post by David Wang [Msft]
will fail under load since ASP.Net static file handler is not as robust as
IIS's.
What you did was assign ASP.Net to handle the .exe extension, and ASP.Net
will send the resource as-is since it doesn't understand .exe files. This
means that ASP.Net settings for static files will apply to the response,
which has its own configuration in the various machine.config/web.config
files applicable.
This is one way to "work", but it is a poor choice because ASP.Net static
file handler is known to not perform well under load nor for large files
(i.e. large Office documents can cause it to choke) -- so you really do
NOT
Post by David Wang [Msft]
want to do this. The official "fix" for this issue is to NOT use ASP.Net
for static files, so if you run into problems, you will have to do what
I'm
Post by David Wang [Msft]
telling you anyway -- so let's just avoid the run-around and do it
correctly
Post by David Wang [Msft]
the first time.
You want to make sure that .EXE is NOT scriptmapped to anything, so that
the
Post by David Wang [Msft]
IIS6 static file handler sends the content in accordance to the MIME Type
settings you make in IIS.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the
instructions
Post by David Wang [Msft]
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension
..exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in
IIS
Post by David Wang [Msft]
Post by Yogita Manghnani [MSFT]
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Yogita Manghnani [MSFT]
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
David Wang [Msft]
2004-11-19 07:12:39 UTC
Permalink
Tomcat has both an ISAPI Extension and ISAPI Filter piece that integrates
with IIS and can completely alter IIS behavior in arbitrary manners,
including what you describe.

I see... this EXE download is used for installation, so now you will simply
cut out the EXE download and just standardize the installation using your
MSI. Good idea. Hopefully, you are using WIX to build this MSI -- if not,
you should consider it. Very good Open Source tool started by Microsoft
with a vibrant user community -- builds MSI from clear-text and declarative
XML.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Peter McLaren" <***@discussions.microsoft.com> wrote in message news:FF3070F2-91E4-4DEA-985B-***@microsoft.com...
As far as I can tell, we are only running Tomcat as an ISAPI application.
Unless Microsoft Project Server is an ISAPI application as well?

The MSI will be based on the results of the installation of the exe that
everyone would have downloaded in the first place. The issue is with the
installation process on a workstation. It is really ugly and requires a
number of custom registry tweaks that need to be made by hand. There is
absolutely no way on the face of this earth that I am going to allow 70 odd
people to screw this up 70 different ways. I am going to get it right with
my
controlled installation and push it out using AD. What I am saying is that I
don't want my staff to download the straight exe and try to install that way
- it is far too error prone. I am going to take off the ASP.Net script
mapping just to prevent them from trying to download it. And I am going to
leave Tomcat configured just the way it is so that they CAN't download this
executable.

If it turns out that I need to download another exe from this IIS server, I
will re-evaluate the Tomcat application configuration.
Post by David Wang [Msft]
Ah, you are running Tomcat and other ISAPI-based applications on the server?
Earlier, I was asking about custom ISAPIs being installed on the machine
because they can alter IIS behavior to be incorrect.
In particular, if this is the case, I'm not certain your MSI will do any
good. The underly problem is a conflict in behavior between some ISAPI and
what you want. Your issue is with a possible bug in that ISAPI.
My leading suspicion right now is that Tomcat's configuration has something
to do with it. Tomcat is supposed to leave static files to IIS to serve
while it handles the JSP ones -- but if that's not the case and Tomcat
botches handling the static files (like .exe), it could explain what you are
seeing. And your "solution" of scriptmapping it to ASP.Net simply told IIS
to give the file to ASP.Net (which does know how to do static file
downloads, relative to Tomcat) instead of Tomcat.
Of course, if this is the case, the best solution is to tell Tomcat to NOT
take over the .exe download, instead of asking ASP.Net to usurp the file
from Tomcat.
The "official" fix I mentioned is to not scriptmap ASP.Net to the .exe
handler (or any other static file, in fact) to support file download.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
This solution may not be "correct", but it is the ONLY solution that worked.
I have verified every setting in IIS6 until I am blue in the face and no
matter what I did, under no circumstances whatsoever, could I download this
executable file from my IIS6 server. Perhaps it was a function of running
Project Server on this box and running a tomcat application as well, but
regardless, those applications are mission critical while this downloading an
executable was not.
Fortunately, it is an intranet site and the task was to download a
relatively small exe file. Based on what I have learned after installing this
executable, the appropriate solution for my company is to have me create an
msi based on the installation of this application and push it out using AD,
so this particular problem is no longer an issue.
You mention an official fix. May I enquire as to what it is? I have searched
the registry and looked at all levels of Web directories in IIS6 to verify
that executables were NOT mapped to any application for the MIME type. (Right
now ASP.Net is handling executables for this directory)
Post by David Wang [Msft]
Wait. Your resolution is not correct. It may "work" but it's not right
and
Post by David Wang [Msft]
will fail under load since ASP.Net static file handler is not as robust as
IIS's.
What you did was assign ASP.Net to handle the .exe extension, and ASP.Net
will send the resource as-is since it doesn't understand .exe files.
This
Post by David Wang [Msft]
Post by David Wang [Msft]
means that ASP.Net settings for static files will apply to the response,
which has its own configuration in the various machine.config/web.config
files applicable.
This is one way to "work", but it is a poor choice because ASP.Net static
file handler is known to not perform well under load nor for large files
(i.e. large Office documents can cause it to choke) -- so you really do
NOT
Post by David Wang [Msft]
want to do this. The official "fix" for this issue is to NOT use ASP.Net
for static files, so if you run into problems, you will have to do what
I'm
Post by David Wang [Msft]
telling you anyway -- so let's just avoid the run-around and do it
correctly
Post by David Wang [Msft]
the first time.
You want to make sure that .EXE is NOT scriptmapped to anything, so that
the
Post by David Wang [Msft]
IIS6 static file handler sends the content in accordance to the MIME Type
settings you make in IIS.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by David Wang [Msft]
//
I am absolutely 100% positive that permissions was set to Scritps only.
The final way that this issue was resolved was by following the
instructions
Post by David Wang [Msft]
In IIS Manager, right click the virtual folder and select
"Properties/Directory". Click "Configuration" button, and then add an
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll extension
..exe.
Restart IIS
Post by Yogita Manghnani [MSFT]
Hello,
Are you sure that the setting Executable permissions for that site in
IIS
Post by David Wang [Msft]
Post by Yogita Manghnani [MSFT]
is set to Scripts only and not Scripts and Executables? I'm not sure how
Firefox works, but if you specify Executable permissions to Scripts only
then IE should prompt you to open/save the exe on the client end.
http://support.microsoft.com/default.aspx?scid=kb;en-us;313075
Good luck,
Yogita Manghnani
Microsoft Developer Support
Internet Information Server
*********************************************************************
Please do not send email directly to this alias. This is an online
account name for newsgroup participation only.<<
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Yogita Manghnani [MSFT]
You assume all risk for your use.
© 2003 Microsoft Corporation. All rights reserved.
*********************************************************************
Jeff Cochran
2004-09-08 15:49:39 UTC
Permalink
Post by Claude
Hi !
1) I made a Web server. It's an only one web page.
2) There's two links in this page. One on a "x.zip" file and one on a
"x.exe" file.
3) If I use a version 5.x IIS, I can download both files
4) If I use a version 6.x IIS, I can download the "zip" file but not the
"exe" file.
Where is the "protection" on IIS 6.x ? How can I modify the 6.x's IIS to
download the "exe" file ?
See:

IIS 6.0 Does Not Serve Unknown MIME Types:
http://support.microsoft.com/?id=326965

Jeff
Continue reading on narkive:
Search results for 'Cant't download "exe" file because of IIS version' (Questions and Answers)
4
replies
i cannot download or uninstall adobe reader ?
started 2010-06-18 12:48:55 UTC
software
Loading...