IIS7 Host Downloadable Files

When I put a file "file_name.rar" in my website directory and want to download it, I keep getting the following error:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

How do I host downloadable files on my IIS7? This used to work on IIS6.
datzent83Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RovastarCommented:
what 500 error are you gettings. LLook in the IIS logs for the subcode 500.x that will give more of an indictation about what is happening.

Also check your mime types
http://blogs.iis.net/bills/archive/2008/03/25/how-to-add-mime-types-with-iis7-web-config.aspx
0
datzent83Author Commented:
Here is the line with the file name:
 2010-04-27 21:54:22 192.168.1.2 GET /NG_ISO.rar - 80 - 192.168.1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US;+rv:1.9.2.3)+Gecko/20100401+Firefox/3.6.3 200 0 0 18829
0
Brad HoweDevOps ManagerCommented:
Hi,

Since this goes though the IIS Web Core and it is a static file, make sure that the user that the application Pool is runnning under for that virtual directory or website (by default Network Service) has read access to the directory where the file is stored.

Simplist fix to test this is grant Everyone Access to that specific file and see if you can access it.

Typical reasons for these errors are

•The user authenticated by the Web server does not have permission to open the file on the file system.

•If the resource is located on a Universal Naming Convention (UNC) share, the authenticated user may not have sufficient share and NTFS permissions, or the permissions on the share may not match the permissions on the physical path.

•The file is encrypted.

Hope it helps,
Hades666
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

datzent83Author Commented:
I added "Everyone" to the file I am trying to download from my IIS7, but unfortunately that did not work.
0
datzent83Author Commented:
The file name I am trying to download from my web server is a *.rar file.
0
datzent83Author Commented:
I think I know what the problem is. When I download small files they go through, but large file, 300MB, give me the 500 error.
0
Brad HoweDevOps ManagerCommented:
So you you have a request posting limit error.
I'm on the road at the moment. But this is easily corrected with a web.config change.
Hades666
0
Brad HoweDevOps ManagerCommented:
Hi,

I just got into the office and tried to replicate your error on a VM and was unable to reproduce.

Windows 2008 /IIS7
1GB dvd.iso gives a 404.3 error because of mime type not defined. This is as expected.
1GB dvd.rar downloads fine.

Things we can try to find out what is happening.

Disable IE "Friendly HTTP Error Messages"
Go to “Tools > Internet Options”, choose the Advanced tab, and clear the “Show friendly HTTP error messages” checkbox.  Then, close the browser, open it again, and re-request the page.

Detailed error logging
Try the following. From IIS Management, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”.

Failed Request Tracing
Requires - Tracing (under World Wide Web Services - Health and Diagnostics - Tracing)

http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis-7/

Hope it helps us diagnose further.


Hades666
0
datzent83Author Commented:
Take a look at the attachment of the error I get.

Capture.JPG
0
Brad HoweDevOps ManagerCommented:
Ok. Thank you,

Something in your Web.config is not correct. A simple test is the following.

1. Create a dummy Site in a new home root. (This creates a blank web.config and applicationhost.config entry)
2. Copy that file into the home root.
3. Try to download it.

If it succeeds, please post your web.config (with restricted parts changed) and I'll see what i can find.

cheers,
Hades666
0
Brad HoweDevOps ManagerCommented:
Have we tried to turn off

appcmd set config -section:urlCompression /doDynamicCompression:false

We could also do this through the IIS Management interface by click on SERVER \ COMPRESSION (uncheck dynamic and static).

Hades666
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
datzent83Author Commented:
hades666: unchecking dynamic and static fixed the issue. Thanks!
What effects does unchecking dynamic and static have on the performance of the server and websites?
0
Brad HoweDevOps ManagerCommented:
Hi,

The trade off is CPU for Bandwidth.
http://weblogs.asp.net/owscott/archive/2009/02/22/iis-7-compression-good-bad-how-much.aspx

Due the the size of the file and the CPU available, the dynamic compression might be the issue.

Try enabling the static compression (for your website files and images to give the faster loading times) and keep dynamic off.

Cheers,
Hades666
0
datzent83Author Commented:
Do I enabling the static compression on the server level or individual website level?
0
Brad HoweDevOps ManagerCommented:
Server Level. the sites inherit by default.

You could if you wanted to only disable it for one site too. This is your choice.

As to way it works with it off is a mystery to me, IIS compression has always been funny.

ex:
appcmd.exe set config "Site Name" -section:urlCompression -doStaticCompression:true -doDynamicCompression:false

Cheers,
Hades666
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.