Answer the question
In order to leave comments, you need to log in
Why do I get a 500 server error when I run the AspNet Core project exe file?
If I start with Visual Studio, then the project starts.
If I run the binary, the file is launched, but the server gives an error 500.
The project contains a standard MVC router taken from the Microsoft "box".
If I run the standard HelloWorld, then the binary starts and everything works.
But when you add a router, something changes and the project then works only through the open Visual Studio, and by itself it stops working normally.
What can be wrong?
Thanks
Answer the question
In order to leave comments, you need to log in
See the logs, if not enabled in the Startup class, then enable them.
Add to the Configure method
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Verbose",
"System": "Information",
"Microsoft": "Information"
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question