Re: serving .exe files in IIS 6.0

From: Wade A. Hilmo [MS] (wadeh@microsoft.com)
Date: 01/13/03


From: "Wade A. Hilmo [MS]" <wadeh@microsoft.com>
Date: Mon, 13 Jan 2003 14:29:04 -0800

Hi bigdog,

>From the error, it appears that you have configured IIS to execute files in
that directory. The request is failing because the lockdown feature in IIS
6 is refusing to run the esinst.exe as a CGI on the server. This is
probably a good thing.

I can tell this because the status information is "404 2". This means the
response was a 404 with suberror 2. 404 with suberror zero is a "real" 404
response (ie. the file was not found). 404 with suberror 2 means that
lockdown did not allow the executable, dll or script to run. Finally,
there is a 404 with suberror 3 that indicates that IIS tried to download the
file to the client, but could not determine a MIME type (If this had been a
404.3, then adding .exe as a MIME type would have corrected it. As it is,
.exe files have the MIME type of application/octet-stream by default, so you
generally would not need to add it).

To allow esinst.exe to be downloaded as a file to the client, be sure that
the virtual directory that contains is does not have execute permissions in
the IIS's MMC. If you really wanted to run esinst.exe as a CGI on the
server, then you would need to go to the "Web Service Extensions" folder in
IIS's MMC, add it as a new extension, and then allow it to run.

One final note: We added the suberror status to the log files, I believe,
between RC1 and RC2. If you are running something prior to RC2, then it's
possible that "404 2" means that the error was a 404 with a Win32 error code
2. In this case, it's a "real" 404 and it just wasn't found. You should be
able to tell conclusively if this is the case by looking at the fields in
the beginning of the log file. It the field after the HTTP status code is
the suberror, then everything above applies. If the field after the HTTP
status code is the Win32 error (or anything other than suberror), then it's
probably a real 404.

I hope this helps,
-Wade Hilmo,
-Microsoft

"bigdog" <msurel@comshare.com> wrote in message
news:bb536467.0301131254.124df1fb@posting.google.com...
> I am having problems setting up a page to allow the download or run of
> an EXE to do an installation routine with IIS 6.0 on .NET server RC2.
> If I zip the file and then put that on the same page, the ZIP file is
> fine but the EXE gives me the following error
>
> Internet Explorer cannot download esinst.exe from myserver
>
> Internet Explorer was not able to open this Internet site. The
> requested site is either unavailable or cannot be found. Please try
> again later.
>
> I tried adding .exe as a MIME type for the directory the file resides
> in, and that doesn't change the behavior. The log file gives me a 404
> error that looks like the following
>
> 2003-01-13 20:26:46 W3SVC1 MYSERVER 130.211.4.184 GET
> /myserver/esinst.exe - 80 user1 130.211.4.184 HTTP/1.1
>
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.0.3705;+.NET+C
LR+1.1.4322)
> - - myserver 404 2 1260 1830 264
>
> In looking at other related messages in this group and others, I
> haven't found anything that should show this error. In fact, one of
> the messages says that a user was having problems with MSI files, they
> changed the extension to EXE, and everything was then downloadable.
>
> I had a similar problem with a file that had a .DAT extension and
> setting the MIME type in the directory cleared up that problem. If
> anybody can give me any clue as to what the problem is, I would
> appreciate it.
>
> Thanks.



Relevant Pages

  • Re: Cantt download "exe" file because of IIS version
    ... I removed the MIME type for EXE. ... Went back to IIS Manager and started at the top of the Web Site Hierarchy ... > IE does have some code to detect download type, extension, and content-type, ...
    (microsoft.public.inetserver.iis)
  • Re: Cantt download "exe" file because of IIS version
    ... The default MIME Type in IIS for .exe is application/octet-stream. ... When I looked at the download type it was still set to the MIME type that I just removed. ...
    (microsoft.public.inetserver.iis)
  • Re: Cantt download "exe" file because of IIS version
    ... I defined the MIME type for the specific EXE to be application/octet-stream, ... By IIS via the static file handler ... > static file handler working to send the download (and the rest of my earlier ...
    (microsoft.public.inetserver.iis)
  • Re: How To Get a File to Download?
    ... Check with your ISP / WPP to see if a MIME type can be set for the extension. ... J-Bots Plus 2002 87 components for FrontPage ... > When creating a hyperlink to a file that should download, ... > such as a file that ends in ".exe" or ".zip", ...
    (microsoft.public.frontpage.programming)
  • Re: Releasing my VB.NET app over the intranet
    ... of the primary EXE and when compiled I am copying the contents ... the directory and open a browser on the web server and type ... > another dll, we need to put the dll in the same directory, so that the clr ... > The executable will be downloaded to the assembly download cache on the ...
    (microsoft.public.dotnet.framework)