Question

I can't seem to get any ASP.NET sites to run under IIS8 on Windows 8. Under IIS Express they are fine, but I've:

  1. Installed IIS8
  2. Installed ASP.NET 3.5 and 4.5 features in IIS
  3. Created a valid application pool
  4. Added a new Application in IIS manager pointing to my site

But I get: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Config Source: -1: 0:

Any ideas?

Was it helpful?

Solution

ASP.Net applications come pre-wired with a handlers section in the web.config.

By default, this is set to readonly within feature delegation within IIS.

Take a look in IIS Manager, under the Server nameFeature delegation. If Handler Mappings is set to readonly and your site web.configs have a handlers section, flip the value to read/write and see what happens.

Worked for me when moving to Windows 8 / IIS 8 / ASP.Net MVC 4.

OTHER TIPS

  1. Click "Start button"
  2. in the search box, enter "Turn windows features on or off"
  3. in the features window, Click: "Internet Information Services"
  4. Click: "World Wide Web Services"
  5. Click: "Application Development Features"
  6. Check (enable) the features. I checked all but not CGI.

i'm using w10 technical preview

I had same issue, this is because the app pool doesn't have rights to the web site directory or web.config. Try to grant rights for "IIS_IUSRS" with : Read,Execute,List.

I had the same issue when moving a web application from IIS 7 to 8, and I solved it by installing the URL Rewrite module, which I had completely forgot. So check that you have the correct modules etc. installed on your new server/IIS.

You can install this module with WPI (Web Platform Installer) also.

If you have a new machine / formatted your machine, while installing IIS, make sure that you ticked installing ASP.Net (appropriate version).

Hint : Turn Windows Feature ON/OFF --> IIS --> Application Development Features --> ASP.Net 3.5 / 4.6

Recently I have upgraded to Windows 10 (IIS 10) & as I had forgot to install ASP.Net, I was facing this issue.

Other troubleshooting tips are:

2) Make sure you have given read permission to IIS_IUSRS group on your application folder.

3) You may check if your Application Pool has correct target .Net framework selected.

4) Make sure your Web.config is proper (well defined XML) and has no errors. Thanks.

Look in the web.config for invalid config sections.

In the IIS manager I couldn't open any of the features such as Module etc.

In my web.config I had an invalid config section from a chart object that I used before:

<system.webServer>
    <httpHandlers>
        <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    </httpHandlers>
</system.webServer>

After I removed it everything worked.

After trying all of the above, I was still stuck, so I decided to go look at the file referenced in my error message, "c:\some\path\web.config"

It was 3KB, and I renamed it to "_web.config", and the script immediately started working properly.

I assume the original created with how things were set before my myriad changes. With all the changes I did, it could now create a proper web.config.

Something to try if the above doesn't get you where you need to be, guys.

Finally sorted mine! Jesus. I was using git hub for my project and downloading it to slightly different locations on each PC.

When I tried to unc to the config file the error mentioned I noticed it was actually the path the other pc uses. Couldn't fine this listed in the project at all so just right clicked the project file in VS and unloaded it, the loaded it again and it now works.

You probably tried this first but have you tried turning your pc off and on again? I tried all of the above first to no avail while simply doing this worked for me. Possibly one of my previous actions locked an important file in my project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top