Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have setup an IIS 6 server to act as a file server. For some of the files, though, clients receive a 404 error.

To diagnose the issue, I enabled directory browsing. I can browse directly to one of the files in question, click on the file, and get the 404.

The website is configured for basic authentication. I verified that the user in question has read permission at the file system level for the desired file.

The IIS log entries for that file access attempt are:

2009-10-26 23:23:38 W3SVC882002786 192.168.1.10 GET /path/to/myfile.war-0.2.45.M.war - 8889 - 72.162.134.92 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US)+AppleWebKit/532.0+(KHTML,+like+Gecko)+Chrome/3.0.195.27+Safari/532.0 401 2 2148074254
2009-10-26 23:23:38 W3SVC882002786 192.168.1.10 GET /path/to/myfile.war-0.2.45.M.war - 8889 - 72.162.134.92 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US)+AppleWebKit/532.0+(KHTML,+like+Gecko)+Chrome/3.0.195.27+Safari/532.0 401 1 0
2009-10-26 23:23:38 W3SVC882002786 192.168.1.10 GET /path/to/myfile.war-0.2.45.M.war - 8889 MYDOMAIN\myuser 72.162.134.92 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US)+AppleWebKit/532.0+(KHTML,+like+Gecko)+Chrome/3.0.195.27+Safari/532.0 404 3 50

So it looks like there are two 401 (access denied) followed by a 404.

Interestingly, .jar files in the same directory can be accessed and downloaded.

Is there somewhere I need to configure IIS to allow other file types to be downloaded?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

What is probably happening is that your server doesn't know that .war is a type of file that needs to be downloaded rather than executed. It then is run through your allowed Web Service Extensions for any matches. If it doesn't find one, it throws a 404 error even though the file does in fact exist.

If you set a MIME type for war files of type application/octet-stream, that should resolve your issue.

share|improve this answer
    
Worked like a charm!. How to set MIME types: support.microsoft.com/kb/326965 –  Eric J. Oct 27 '09 at 4:22
add comment

It looks like your file is over 2GB in size which, if I'm not mistaken, is well beyond the allowed size for IIS. you need to edit the metabase.xml file to change the value. I believe the setting you need is AspBufferingLimit, and if you look at it you should see that it's set to 4194304. Set it to 2560000000 and see if you can download the file.

share|improve this answer
    
I see the number in the log you must mean 2148074254, but the file is actually 15.8KB. Not sure what that large number means. –  Eric J. Oct 27 '09 at 4:16
    
Sorry. I wasn't sure what logging options you had set (I guess I should have asked). I thought that might be the server to client bytes being listed, and it looked like it was over 2GB. Glad you got it working based on Will's answer. –  joeqwerty Oct 27 '09 at 11:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.