Click here to Skip to main content
15,885,895 members
Articles / DevOps / Deployment
Tip/Trick

Fix : HTTP Error 404.17 : The requested content...

Rate me:
Please Sign up or sign in to vote.
3.67/5 (6 votes)
4 Mar 2015CPOL2 min read 95.4K   3   3
Fix : HTTP Error 404.17 : The requested content appears to be script and will not be served by the static file handler

Introduction

You may got following error while browsing your ASP.NET website (in IIS 7/7.5/8/8.5), which reads, "HTTP Error 404.17 : The requested content appears to be script and will not be served by the static file handler"

see below error snap

Image 1

Causes

 There are many causes behind this problem
1.  HTTP Handler configured to handle the request has certain preconditions set, but its Application pool does not meet some or all of these preconditions, in simple words Application pool's .NET framework is not set properly to the application in which it is compiled (If my application developed in 4.5 and I am attaching application pool with framework 2.0)

2. If application is migrated from IIS 6 then My Application pool should running in Classic Mode, with enable 32 bit mode options

3. Required .NET framework has restriction in 'ISAPI and CGI restrictions' in IIS

Resolution

Problem can be resolved by following steps
1. Open IIS manager (Go to start - Run - type 'INETMGR')

2. Select the Server Name (System Name)

3. Select ISAPI and CGI restrictions in right side pane

4. Allow the Not Allowed restrictions for required framework

see below snippet, to know how to allow ISAPI and CGI restrictions

Image 2

 

5. If your required framework will not exist in ISAPI and CGI restrictions  then you need to re-registered framework with following command

6. Go to Start - Run put following command in Run window

C:\Windows\Microsoft.NET\Framework\v4.0.30319 \aspnet_regiis -i

 

see below snippet to know how to run command from Run window

Image 3

run command here i have given example for .NET fremework 4.0, you cna use same command for any .NET framework

7. Set required .NET version in application pool

8. Enable 32-bit Application in application pool

9. Restart IIS

That's all, Now try to browse the same website, we have resolved the bug.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India
Hi there, I am Prasad. Author, Blogger, contributor and passionate about Microsoft .NET technologies. I like to write an articles/blogs on different .NET aspects and like to help Developers, to resolve their issues and boost them on Microsoft Technologies.


Certifications: Microsoft Certified professional (MCP), Microsoft Certified technology specialist (MCTS), Agile-Scrum Master.


Awards: Microsoft Re-connect MVP (GSC Member), Most valuable member at dotnetspider, Most popular curator, Most active curator, featured curator at Microsoft Curah, Editor at dotnetspider.


Microsoft MVP 2014 [ASP.NET/IIS]
Click here for more .NET Tips
-After all Knowledge is an endless entity

Comments and Discussions

 
Questionfor installing ASP.net 4.5 on windows server 2012 Pin
Member 45905793-May-17 4:08
Member 45905793-May-17 4:08 
QuestionMy vote of 1 Pin
supernorb29-Oct-15 20:23
supernorb29-Oct-15 20:23 
AnswerRe: My vote of 1 Pin
koolprasad20031-Nov-15 17:07
professionalkoolprasad20031-Nov-15 17:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.