vendredi 26 février 2021

Internal Error 500 Asp.net core 3.1 Web API in Browser

I’m working on an ASP.NET Core 3.1 Web API project with ReactJS for it’s front-end. When I send a get request from back-end to Postman everything is fine and the data is returned. But when the data is sent by the client via ReactJS I get Internal Error 500.

I’ve tried every solution I could find online and they didn’t really help. Am I supposed to change anything in IIS settings or in web config?

this is Web Config :

    <configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\Core.API.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
    <connectionStrings>
        <remove name="LocalSqlServer" />
        <add connectionString="Server=.;Database=AuthenticationDb;User ID=sa;Password=123" name="AuthenticationDb" />
    </connectionStrings>
</configuration>



Aucun commentaire:

Enregistrer un commentaire