0

I moved in a new workstation and I have reinstalled IIS Express. Also, I have installed CORS module because my application is using .net 4.8 with Visual Studio 2019

But when I try to start the application, I am stuck in configuration errors, even if I have copied DLL and schema files in IIS Express files and default applicationhost.config

The strange thing is that if I remove the cors section in web.config file, I have a 500.60 CORS error, but when I insert the section in Web.config, I have 500.19 error

this is the section I use:

<cors enabled="true" failUnlistedOrigins="true">
  <add origin="*">
    <allowHeaders allowAllRequestedHeaders="true" />
    <allowMethods>
      <add method="GET" />
      <add method="POST" />
    </allowMethods>
  </add>
  <add origin="http://*" allowed="false" />
</cors>

Anyone has the same problem?

1
  • The superuser.com community would be better suited for a server configuration question Commented Jan 8, 2024 at 12:45

1 Answer 1

0

You need to install the IIS CORS module to IIS Express, and the steps are not trivial.

But I wrote about that and made a few PowerShell scripts to help.

Sign up to request clarification or add additional context in comments.

2 Comments

"I have installed CORS module"
@starball if you verify what I meant exactly, you will see that CORS module wasn’t installed for IIS Express. 500.19 is clearly the proof.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.