IIS - The requested content appears to be script error after hosting in iis

Asked By gopal krish on 17-May-12 06:52 AM

hi ..

i am having asp.net 3.5 application and i hosted this and this application contains application pool version in 2.0.

(sample.com) AND its works perfectly.

now i am having a wcf service in  3.5 version. and its application pool is in 2.0 version.
Note:
in my iis 7 having .net2.0 and .net 4.0 versions only.
now i created a virtual directory inside sample.com . when i try to access my service in remote server itself, i received the below error.

HTTP Error 404.17 - Not Found

The requested content appears to be script and will not be served by the static file handler.


how to handle the above issue..

need ur suggestions...
regards
gopal.s



Jitendra Faye replied to gopal krish on 17-May-12 06:59 AM
First check that-

First, verify the application pool is running in "Integrated" mode rather than classic.  In IIS find the web folder and select it.  Then click Advanced Settings.

Under Application Pool, choose the Application Pool for ASP.NET v4.0 running in Integrated Mode.

refer this link  -

http://www.banmanpro.com/support2/Requested_Content_Appears_to_be_Script.asp


Shan P replied to gopal krish on 17-May-12 09:02 AM
It sounds like your IIS is mapping your WCF requests to the IIS static handler. That is, IIS is not configured any differently to process .svc files versus .css, .html, image, etc. static files. IIS is providing you a warning message to you indicating that it is likely that the .svc URL that is getting requested is likely is a script file. It's probably doing this for security reasons. So that's sort of a nice built in IIS security feature. Otherwise IIS would return the .svc source code directly to callers which would be a huge security issue. 

I think if that's the case, what you will likely have to do is configure the appropriate WCF mappings in IIS. See http://msdn.microsoft.com/en-us/library/bb515343.aspx for details. 
Somesh Yadav replied to gopal krish on 17-May-12 09:06 AM
<div class=posthead>Please follow this...............</div> <div class=posthead> </div> <div class=posthead>IIS 7 HTTP Error 404.17 The requested content appears to be script </div> <div class=postbody>

"HTTP Error 404.17 - Not Found - The requested content appears to be script and will not be served by the static file handler."


To fix this error change you application pool from default to Classic .NET AppPool
 

Source: http://www.gtrifonov.com/blog/2009/02/27/IIS_7_HTTP_Error_404_17_The_requested_content_appe.aspx

If the problem is there then do let us know.

</div>