"There was an error while performing this operation"

asp.netIis

asp.net Problem Overview


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.

asp.net Solutions


Solution 1 - asp.net

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 - asp.net

> 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 - asp.net

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 - asp.net

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 - asp.net

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 - asp.net

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 - asp.net

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 - asp.net

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

Solution 9 - asp.net

**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 - asp.net

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 - asp.net

  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 - asp.net

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnupam YadavView Question on Stackoverflow
Solution 1 - asp.netAnupam YadavView Answer on Stackoverflow
Solution 2 - asp.netTodView Answer on Stackoverflow
Solution 3 - asp.netdstelowView Answer on Stackoverflow
Solution 4 - asp.netTheBadgerEBView Answer on Stackoverflow
Solution 5 - asp.netAbdulraqeeb M.View Answer on Stackoverflow
Solution 6 - asp.netMDaveView Answer on Stackoverflow
Solution 7 - asp.netLDJView Answer on Stackoverflow
Solution 8 - asp.netpassionatedevopsView Answer on Stackoverflow
Solution 9 - asp.netSagar MView Answer on Stackoverflow
Solution 10 - asp.netholderView Answer on Stackoverflow
Solution 11 - asp.netuser5579363View Answer on Stackoverflow
Solution 12 - asp.netStumblorView Answer on Stackoverflow