IIS - Exe files on Windows 2003 Server IIS6....

Asked By jim
04-May-08 02:14 AM
I have some exe files in a "files" directory on Windows 2003 Standard
Edition Server running IIS.

The  "files" directory is a sub-directory of a site on the server that
functions as expected except for when you click a link to any *.exe file in
this directory.  If you try and access and exe file, you get a 404 "File not
found" error.

The files are on the server and in the proper location, so it must be a
security setting of some type.  The problem is.....what type?

Do you know why I cannot access the exe files on this site?

Any help that you could offer would be greatly appreciated.

Thanks!
Windows 2003 Server
(1)
IIS 6.0
(1)
IIS
(1)
CucTj.64706
(1)
Kudos
(1)
Directory
(1)
Securety
(1)
Octet
(1)
  jim replied...
04-May-08 02:34 AM
Well, I found the answer at ....
http://blogs.msdn.com/david.wang/archive/2005/07/11/Allow_file_downloads_on_IIS_6.aspx

Basically, David Wang said......

Your error message indicates that you have "Scripts and Executables"
enabled, so IIS is trying to execute the .exe file on the web server, and
since the .exe is not allowed by any defined Web Service Extension, a 404.2
results. The corrective action depends on what you want to do.

1.. If you want to allow .exe files to be downloaded as-is to the browser,
then you must NOT have "Scripts and Executables" as Execute Permissions.
2.. If you want to execute the .exe file on the server to generate a
response that is sent to the browser (possibly interpreted as a download),
then you MUST have "Scripts and Executables" as Execute Permissions, and you
must enable a Web Service Extension for that .exe file.
Details
Whenever the user makes the browser request a resource like
to happen:

1.. Return the file contents of myapp.exe as-is to the browser (aka file
download)
2.. Execute myapp.exe on the web server to generate a dynamic response
(aka execute CGI script)
Now, the web server controls which action should happen, and on IIS, this is
controlled by the "Execute Permissions" property of the virtual directory
containing the .exe file. If the permission is set to "Scripts and
Executables", then IIS will do action #2. Otherwise, it will do action #1.

Prior to IIS 6.0, there were no further security checks against either
action. On IIS 6.0, there is one additional security check, depending on the
action:

1.. For action #1, the file resource's extension (.exe in this case) must
have a defined MIME Type or else a 404.3 occurs. .exe has a MIME Type of
application/octet-stream by default, so file download should just work.
2.. For action #2, there must be an enabled Web Service Extension for the
full path to the .exe resource to allow IIS to execute it to generate a HTTP
response or else a 404.2 occurs. For securety reasons, IIS 6 does not allow
any resource to execute by default unless otherwise configured/allowed in
Web Service Extension.
//David"

Kudos to David Wang and his wonderfully short and to-the-point advice!
(Bookmarking his site wouldn't be a bad idea either...)

jim
  David Wang replied...
06-May-08 02:40 AM
Thanks for finding and answering your own question! :-)

That is what I am hoping the blog can do -- be a searchable repository
of answers and advice that I commonly encounter, condensed in the way
that I want (instead of the little mess I have to go through to get it
published otherwise).


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



005/07/11/Allow_file_downlo...
2
ser,

ou

le

is

he
ust
the
TP
w
Create New Account
help
iis7 on windows server 2003 r2 IIS Is iis7 available on windows server 2003 r2? IIS Discussions Windows Server 2003 (1) Windows Server 2008 (1) Windows Vista (1) Iis7 (1) IIS7 is only available
Windows Update related to IIS IIS Hello: My IT department pushed the folllowing updates to the server. Windows Internet Explorer 7 Dynamic Installer Cumulative Security Update for Internet Explorer 7 Dynamic Installer for Windows Server 2003 (KB953838) Wednesday, August 13, 2008 Other Source Windows Server 2003 Update for Windows Server 2003 (KB951072) Wednesday, August 13, 2008 Automatic Updates Windows Server
IIS 7 IIS Is IIS 7 supported on Windows server 2003? IIS Discussions Windows Server 2003 (1) Vista (1) IIS (1) McNight (1) Hi, No, you cannot install IIS 7 on Windows Server 2003. You can only install it on the version of Windows it was shipped with
Cannot run old ASP files in Windows 2003 Server R2 64 Bit IIS I have old ASP pages that runs on Windows 2003 Server 32 Bit. I now am trying to run them on Windows 2003 Server 64 bit. I get the error HTTP / 1.1 500 Server Error IIS is
Installing ISS on Windows Server 2003 R2 IIS Hi, I'm trying to install ISS under windows Server 2003 - I go to the windows components on add / remove programs and select Application Server - Which includes IIS in its details - I click next and it asks for the Windows