'"There was an error while performing this operation"

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.



Solution 1:[1]

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..."

Solution 2:[2]

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.

Solution 3:[3]

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://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x#install-the-net-core-windows-server-hosting-bundle

Solution 4:[4]

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://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1

Solution 5:[5]

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.

Solution 6:[6]

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://docs.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.

Solution 7:[7]

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!!!

Solution 8:[8]

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

Solution 9:[9]

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

Solution 10:[10]

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.

Solution 11:[11]

  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.

Solution 12:[12]

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