IIS Error: This configuration section cannot be used at this path …

Reference SO question and answer:

https://stackoverflow.com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path

Try to fix this by installing “Internet Information Services” => “World Wide Web Services” => “Application Development Features” from “Turn Windows features on or off”

Maybe you need to install ASP.NET 4.8, or something similar, try out few things depending on your project.

401.3 – unathorized – You do not have permission to view this directory or page because of the access control list (ACL) configuration or encryption settings for this resource on the Web server.

Go to root node of IIS -> Authentication -> Anonymous Authentication, check which user the anonymous inherits the permissions from, set it to ApplicationPoolIdentity.

Then make sure the ApplicationPoolIdentity has permission to access the folder.

Web Service Host for WCF doesn’t work

If you open a WCF Solution that uses a web site to host the WCF services and the services cannot be browsed when opening using a web browser (showing HTTP error 403.1 not found), try turning on HTTP Activation feature.

On Windows server, go through server manager.

On Windows desktop, search for turn Windows features on or off, Under .NET Framework Advanced Services -> WCF Services -> HTTP Activation. Check HTTP Activation to enable it, and click OK.

This really wasn’t apparent at first and I thought there was some issues with the config files.

Cannot find Certificate when configuring IIS bindings

When configuring bindings, IIS list certificates in the personal store.

So when generating a certificate using Powershell or Openssl, make sure the cert is in the Personal store. Then it will show up when configuring SSL bindings in IIS manager.

In order for the browsers to trust the cert, install self-signed certs to the trusted root CA store. But don’t remove it from Personal store, because it’s needed for bindings.

500.19 – Internal Server Error – The requested page cannot be accessed because the related configuration data for the page is invalid

Today I faced this error while trying to run a web application.

It turned out that it was occurred in a REST request to the server to retrieve a JSON file. I tried to solve this issue by first opening IIS and check the declared MIME types under the web application, then it complained that there is a duplicate entry in the web.config file.

It turned out that if the web.config file contains a declaration for the MIME type .json and under the application in IIS the MIME type is also declared, IIS will complain. I solved the issue by removing the MIME type declaration from the web.config file.

Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.json’

This issue occurred today while I was trying to run an Ext JS application from IIS, because .json files are not accepted by IIS I tried to add this file extension to the application. But instead I got a 500 error when trying to browse the application.

After some digging and searching the MIME types section of the website and all other applications, I couldn’t find the conflicting extension.

I was able to solve the issue by editing the application’s web.config file, right before the mimeMap tag, add a remove tag like following:

<staticContent>

<remove fileExtension=.json/>

<mimeMap fileExtension=.json mimeType=application/json />

</staticContent>

I still have no idea why this works, but it works.