"500 - Internal Server Error" when calling ASP .Net Core 2.1.7 microservice on Windows Server


Developer

I have ASP.Net Core based microservices deployed on IIS10 running Windows 10 Enterprise.

enter image description hereThis application works fine in all lower environments (Dev, QA) when I try to test it in UAT

enter image description here

I verified the logs and it says there are no other 500 records. In the IIS log it says 500 0 0 and nothing else.

I've tried enabling verbose logging, tried running in dev mode as shown below, but still no details are printed :( I even tried running from command prompt, but limited error 500.

The application internally calls another service that is also running on the same computer, when I hit that standalone server that is running. This works fine in QA with the exact same code and configuration.

enter image description here

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <system.webServer>
   <handlers>
     <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
   </handlers>
   <aspNetCore processPath="dotnet" arguments=".\Communications.Api.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="true" startupTimeLimit="3600" requestTimeout="23:00:00" stdoutLogFile=".\logs\stdout">
     <environmentVariables>
           <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
     </environmentVariables>
    <handlerSettings>
        <handlerSetting name="debugLevel" value="file" />
        <handlerSetting name="debugFile" value="D:\Communications\logs\ancm.log" />
 </handlerSettings>
   </aspNetCore>
   <security>
     <requestFiltering>
       <requestLimits maxAllowedContentLength="700000000" />
     </requestFiltering>
   </security>
    <httpErrors errorMode="Detailed" />
 </system.webServer>
     <system.web>
       <customErrors mode="Off" />
       <compilation debug="true" />
   </system.web>
</configuration>

How to get details to understand the actual problem :( Please guide.

Developer

Here is the solution to this problem.

There are some configuration differences between QA and UAT.

When I changed the URL to localhost it started working.

Related


ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core hosting - 500 Internal Server Error

username I'm trying to publish as an ASP.NET Core project using a hosting provider that supports ASP.NET Core. I get a 500 Internal Server Error, which is pretty common. So I searched on the internet and various forums and checked processPath="%LAUNCHER_PATH%"

ASP.NET Core Web API 500 Internal Server Error

Fear I am trying to build an API within the ASP.NET Core framework. I made a basic controller that just returns a string: namespace Dojo_Api.Controllers.Forum { //[Authorize] [Route("api/[controller")] public class ForumController : Controller

asp.net core application. 500 Internal Server Error

David Edel I uploaded my website to godaddy windows hosted with plesk. All files are uploaded but I get an error: 500 Internal Server Error. There is a problem with the resource you are looking for and cannot be displayed. By researching the problem online, I

500 Internal Server Error when hosting .net Core app in Docker

Avzal I created a test application in .net Core Framework and it works perfectly in development environment. I later published this to a docker container and it worked perfectly because the hosting IP address I declared was listening and I could browse it via

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token Body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token Body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r

Asp.Net Core 2 Web API 500 Internal Server Error

Anil When I try to access the API through postman, send: localhost:5050/api/Auth/token Body: {“ UserName”:“ jouverc”,“ Password”:“ P @ ssw0rd!” } This method: [Produces("application/json")] [Route("api/Auth")] public class AuthController : Controller { #r