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%" arguments="%LAUNCHER_ARGS%"in the web.config and found that they use the correct translation processPath="dotnet" and arguments=".\MyApplication.dll".

I also checked the connection string and it points to a working production database server. I confirmed the database connection by changing the connection string to the production database and running the project locally. It works and has access to the production database.

I also tried to get the error message (no env related) by using the following in Startup.cs:

app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
app.UseBrowserLink();

I also enabled stdoutLog in web.config, but I don't see that folder either:

stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"

I also tried changing applicationUrl and launchUrl in launchSettings.json to my prod Url but it didn't work.

So the "500 Internal Server Error" refused to go away, and I still don't have a useful error message. The page only shows:

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

I would appreciate if someone could help me here.

Lukasz Makowa

I also enabled stdoutLog in web.config, but I don't see that folder either:

stdoutLogEnabled =“ true” stdoutLogFile =“。\ logs \ stdout”

Here's a trick - you have to create both folders logsand stdoutmanually - and then only then will IIS create a logsfolder inside the log files (not stdoutas you can expect) - don't ask me why because I don't know why ;)


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

Usually this means there is a problem with the configuration in Startup.cs - the most common issues include issues with the database itself, migration issues (if using the Code First approach), appsettings.js issues, social login credentials issues (e.g. missing SecretKey) ...

Please refer to the log file .\logs\stdout- it's the fastest way to find details about the problem :)


app.UseDeveloperExceptionPage();

app.UseDatabaseErrorPage();

These will work after the WebApp is fully launched, but not when the application is launched.

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%"

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 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 Hosting

Harun Aslam I have a website on hosting but I am getting 500 internal errors for a single website I don't know what to do I have set the php flag and this is my .htacces file code # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / Rewrit

500 Internal Server Error on Shared Hosting

Akinniyi Bode Bolade I have a react app hosted on www.example.com and the REST API is a node app in the backend folder which links to www.api.example.com However, as soon as I have content in the .htaccess file in my react build, my rest API shows a 500 intern

ASP.NET Core API-500 Internal Server Error, in production only

facelift I have developed an ASP.NET WebApi application. When I publish and test it to localhost IIS I get this error on one request: Response with status: 500 Internal Server Error for URL: http://localhost/api/COMI/NEW/158/3 web.config: <?xml vers

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 API-500 Internal Server Error, in production only

facelift I have developed an ASP.NET WebApi application. When I publish and test it to localhost IIS I get this error on one request: Response with status: 500 Internal Server Error for URL: http://localhost/api/COMI/NEW/158/3 web.config: <?xml vers

ASP.NET Core API-500 Internal Server Error, in production only

facelift I have developed an ASP.NET WebApi application. When I publish and test it to localhost IIS I get this error on one request: Response with status: 500 Internal Server Error for URL: http://localhost/api/COMI/NEW/158/3 web.config: <?xml vers

ASP.NET Core API-500 Internal Server Error, in production only

facelift I have developed an ASP.NET WebApi application. When I publish and test it to localhost IIS I get this error on one request: Response with status: 500 Internal Server Error for URL: http://localhost/api/COMI/NEW/158/3 web.config: <?xml vers

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