144

I have a website in IIS for which I cannot open any of the settings like Authentication, Handler Mappings, Authorization Rules etc. It just shows the error message "There was an error while performing this operation", with no more details and points to web.config.

Browsing the website results in a 500.19 error.

I tried adding iis_iusrs to the website folder and web.config, changing the app pool identity giving access to same on web.config/website folder security settings, verified target framework, iisreset/app pool recycles to no avail.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Anupam Yadav
  • 4,353
  • 4
  • 19
  • 20

12 Answers12

263

It turned out the website was using URL rewrite module which i was missing.

Downloaded web platform installer from MS and installed URL rewrite module.

http://www.microsoft.com/web/downloads/platform.aspx

Wish IIS errors were more informative than just "There was an error..."

Anupam Yadav
  • 4,353
  • 4
  • 19
  • 20
  • 14
    The URL Rewrite module can be the cause of a number of misleading error messages and countless hours wasted... – Brett Postin Apr 28 '14 at 11:18
  • 2
    The way to trouble shoot is remove the rewrite section in web.config. If this solves the problem you need the rewrite module. – Rob Nov 20 '19 at 18:49
  • 3
    Thank You! I installed it from here https://www.iis.net/downloads/microsoft/url-rewrite as of March 2022 – Wadih M. Mar 30 '22 at 18:08
  • Absolute lifesaver. Yet another useless error message. Thank you very much for taking the time to post this answer. – Fawlty Aug 30 '23 at 16:33
34

I am running IIS 8.5 and I deployed my first Asp.Net Core 2.0 (Razor pages) site to the IIS Server (on Windows Server 2012 R2) that was running several Asp.Net Framework/Classic websites. This worked for me:

Install the .NET Core Windows Server Hosting bundle

https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x#install-the-net-core-windows-server-hosting-bundle

dstelow
  • 573
  • 7
  • 10
  • 1
    the hosting bundle is now part of .NET Core 2.1 SDk https://www.microsoft.com/net/download/windows – esun203 Jun 28 '18 at 09:07
  • This solved it for me too! I already had URL Rewrite installed, and existing sites run on .Net Framework. Today I'm adding a new website that runs on .Net Core, and installing the .Net Core Hosting Bundle fixed it for me. Got it from here: https://dotnet.microsoft.com/download/dotnet-core/3.1 – Whitzz Sep 07 '20 at 22:32
  • 1
    This was the problem that I had, but I needed the [.NET Core 6](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.6-windows-hosting-bundle-installer) bundle. – silvertiger Jul 05 '22 at 18:56
27

It turned out the website was using URL rewrite module which i was missing.

This wasn't my problem and it was. I already had URL Rewriter installed, but after a Windows 10 upgrade IIS wasn't aware of it. A simple repair on Control Panel => Programs and Features => IIS URL Rewrite Module 2 and it was working again.

Tod
  • 2,070
  • 21
  • 27
  • 1
    you saved my day! I had same issue and resolved in exactly same way as you suggested and all works again now. in our case we upgraded server from windows 2012 to windows 2016. – Davide Piras Jan 12 '18 at 10:52
  • 1
    legend. I was re-installing a trashed server and every time I created a site for one of the sites to be restored I would see this error. I'd forgotten about the re-write rules in the web.config! – Nattrass Dec 19 '19 at 18:59
  • I was fighting with that to run NAV Web Client. I reinstalled a lot of things here lol Bro, it also saved my life. Only repairing Rewrite Module worked, thins :) – Belarmino Vicenzo May 19 '20 at 12:36
  • I had the same issue, reinstallation of rewrite module was not useful for me, but repairing worked. Thanks! – denisv Jul 22 '20 at 15:10
20

My issue was that I installed the .NET Core Hosting Bundle before I installed IIS. Re-running the Hosting Bundle installer with Repar fixed it for me.

https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle

If the Hosting Bundle is installed before IIS, the bundle installation must be repaired. Run the Hosting Bundle installer again after installing IIS.

MDave
  • 1,245
  • 13
  • 29
  • 1
    I didn't even need to find the installer to run it. I just went into Control Panel -> Programs and Features and then right-clicked on the Microsoft .NET Core 3.1.2 - Windows Server Hosting item and selected Change which then brought up the option to Repair. Right after it repaired, it all worked. – VinceL May 20 '20 at 20:49
  • In my case, I uninstalled all the different versions of .NET Core versions. Again installed the one I wanted to install. After that I am able to open the SSL settings. – Rajaraman Subramanian Dec 20 '22 at 12:50
  • Also as @MDave commented, in another instance, repairing existing .NET Core Hosting Bundle fixed the issue for me. – Rajaraman Subramanian Dec 21 '22 at 15:06
14

I had this issue as well. Trying to run ASP.Net Core on IIS 10. All I needed to do was this: Development Time IIS Support

Screen shot taken from: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1

TheBadgerEB
  • 473
  • 1
  • 4
  • 10
11

I had this issue lately , the solution for me was installing : ASP.NET Core/.NET Core: Runtime & Hosting Bundle. You can find it here.

Also before installing it , make sure your wwwroot security permissions is set to allow both iis_iusrs and iusr to have Read, Write and Execute permissions.

Abdulraqeeb M.
  • 319
  • 3
  • 7
5

same here also IUSR was missing from anonymous authentication credentials.

If the .net core Hosting Bundle is installed before IIS, the bundle installation must be repaired. Run the Hosting Bundle installer again after installing IIS.

holder
  • 93
  • 1
  • 10
4

I installed .Net core Hosting Bundle from https://dotnet.microsoft.com/download/dotnet-core/2.2 and it fixed.

3

Similar to the marked solution here, I had the same problem and again it was a missing IIS module, but this time it was the Application Initialization Module that was required, not URLRewrite. installing via the Web Platform Installer or IIS.net. fixed the problem.

Steps I took to debug this though was to section by section go through my web config removing each section and attempting to load the site and/or let IIS parse the config. When I removed the section pertaining to initialization optimisation this fixed the issue and I immediately remembered that this dependency was added a fair while ago.

Echo the sentiments though that this really needs better error messages!!!

LDJ
  • 6,896
  • 9
  • 52
  • 87
2

works 100% ****check any urls are there inside <appSetting></appSetting>, try to comment these unknown urls

 <!-- <add key="ErrorLogWebApi" value="https://websitename.com/api" />-->

and also comment <rewrite></rewrite> tag completely

now you try

Sagar M
  • 1,168
  • 13
  • 10
1
  1. I just double click on the Application that have the error and
  2. change the version of the .NET Framework and
  3. then change it back to the original version and
  4. recycled the App Pools.

e.g.:

The application has .NET Framework v4.0.30319 and I changed it to .NET Framework v2.0.50727 then the Status was turn into Stop, then I double click back and change to .NET Framework v4 and then right click recycle and recycled it.

davejal
  • 6,009
  • 10
  • 39
  • 82
1

Same error message, but my C:\ had run out of disk space.

Stumblor
  • 1,118
  • 8
  • 16