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

regeme picture regeme · Mar 25, 2013 · Viewed 84.9k times · Source

I know there are related posts here on this forum and another resources but I got stuck with this and couldnt proceed.Problem is i've done a website with vs2010 when i publish it to ftp server and navigate to url adress I got this error. Here the things that i've done

-I've enabled IIS services and static content

-I've revert to parent the staticFile under handler mappings

-I've registered the asp.net again in command prompt(the regiis.exe thing)

-In IIS manager i've added my website adress under sites, stopped default web site and started mine.

-I've added my site to classic.NET AppPool(integrated,and v4.0)

-I've enabled the default browsing..

-I've done all the advices that generally covered..

Here is my web.config

<configuration>
<system.webServer>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" />
<defaultDocument>
  <files>
    <add value="AnaSayfa.aspx" />
  </files>
</defaultDocument>
</system.webServer>
<system.web>
<compilation debug="true" targetFramework="4.0" />

</system.web>
 </configuration>

where am I doing mistake? I've spent 2 days and couldnt proceed an inch.I will burst into tears if this problem solved.Any help will be greatly,greatly,greatly! appreciated,will be my hero,master (: thanks

Answer

Ravindra Gullapalli picture Ravindra Gullapalli · Jun 13, 2013

Go to Command Prompt and install / repair ASP.NET

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

Go to IIS => Select the Server Name (System Name)

Go to ISAPI and CGI restrictions

Allow the Not Allowed restrictions.