asp.net core application deployed on IIS encounters 500 internal server error


yitian :

:( Oops 500 Internal Server Error An error occurred while starting the application.

This message appears when I add database functionality to asp.net core application and deploy it to iis. When I develop it in Visual Studio everything goes well. But after deployment, this error message appears.

I tried to use to dotnet myapp.dllrun my app in the deploy folder and found it worked fine. The problem may be related to iis. I've tried adding <compilation debug="true">..</compilation>to web.config, but that doesn't seem to work. What exactly is the problem, or is there any other way to see the detailed error message to help figure out what's going on?

set up:
  1. Change stdoutLogEnabled="false" to true and check the logs in stdoutLogFile=".\logs\stdout". The error there might tell you something.

  2. Check that the correct environment name is set using the ASPNETCORE_ENVIRONMENT environment variable , so use the correct setting (eg connection string). By default, you have a "development" environment on your computer.

  3. You can use error handling middleware to display exceptions, e.g.

    app.UseDeveloperExceptionPage();
    

Related


ASP.NET IIS Application 500 Internal Server Error

Moon Ninja I have a very strange problem. I have a development environment where I develop an ASP.NET MVC application and everything works fine in this environment. In particular there is an AJAX call in the Application that calls the controller and passes the

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

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

Brandon I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server erro

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

ASP.NET Core WebAPI 500 Internal Error in IIS 7.5

james I am trying to get this WebAPI to work. Well, use IIS. Everything works fine in IIS express, but when I publish it, especially 1 api request doesn't work. The url I am trying to access API/[Controller]/{date}/{integer}. I keep getting a 500 server error.

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