VINCENT Labouré
VINCENT Labouré

Reputation: 31

IIS express error500.24 web API

I migrate an dotnet framework web api application from vs 2010 to 2019. I want to use IIS express for developpement mode debug. My application is built with a api back in dotnet framework 4.5 using XML and not JSON and a front in dotnet winform.

error API rest

message html front

error front

Sorry for the French messages.

I tried to change the web.config, the applicationhost.config (in the user IIS express directory and the .VS\config directory. add modules to IIS manager

IIS config

Upvotes: 1

Views: 113

Answers (3)

VINCENT Labouré
VINCENT Labouré

Reputation: 31

thanks for your help I have tried validateIntegratedModeConfiguration="false"

and it worked only when I deleted the lines created in the applicationhost.config (but it's not a solution) we finally found: the problem was that I modified the .csproj file; but the file used for the user configuration is the .csproj.user. It is modified with the "property" tab of VS. I had seen it in a post for an mvc web application, since we are using an api, I thought it was different because it is an api..... My colleague showed me the options in the panel... and now it works!!!!

[configuration]You have to modify in properties : anonymous authentication : disable windows authentication : enable pipiline mode : classic and that's all

Upvotes: 0

Berkay Yaylacı
Berkay Yaylacı

Reputation: 4513

Try removing this line from your web.config,

<identity impersonate="true"/>

Or, as Described in here;

  • Your application's Web.config file specifies "identity impersonate='true'".

In IIS 7 Integrated mode, client impersonation is not available in some early request processing stages. Therefore, IIS will generate the migration error message. If your ASP.NET Web application impersonates client credentials (most common with intranet scenarios), you may want to set the validateIntegratedModeConfiguration attribute to false.

Add this section to your config to overcome this issue,

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
</system.webServer>

Upvotes: 1

Make sure all the following .NET modules are installed.

  1. .NET SDK 6.0.100
  2. .NET Runtime 6.0.0
  3. .NET hosting 6.0.0 note that the above are the current versions the versions may differ. also change the version of .config files by running as Administrator whether you open the .json on Notepad or your IDE. make sure your Internet Information Services is up to date and have selected all features on IIS

Upvotes: -1

Related Questions