After publishing my .net core 2 app on IIS 7.5 I get this error:
an error occurred while starting the application.
Is there any way to force dot net core to submit a accurate error message rather than such general message?
As a non-LTS (“Current”) release, it is supported for three months after the next release. . NET Core 3.0 was released on September 23, 2019. As a result, . NET Core 2.2 is supported until December 23, 2019.
NET Core 2.1 will be reaching end of support on August 21, 2021 and after this date we will no longer provide updates including security fixes, or technical support for this version. We strongly recommend you migrate your applications to . NET Core 3.1 or later before this date.
The Run Extension method is used for adding terminal middleware that means Adds a terminal middleware delegate to the application's request pipeline. This method takes two Parameters: app: The Microsoft. AspNetCore. Builder.
I found this link helpful: How to troubleshoot: “An error occurred.... In summary:
<aspNetCore>
element of your web.config
, set stdoutLogEnabled
to true
.<aspNetCore processPath=".\myapp.exe"
stdoutLogEnabled="true"
stdoutLogFile=".\logs\stdout" />
Create your log folder.
Example: Given stdoutLogFile=".\logs\stdout"
, create logs\
in your application root directory. .\logs\
is the directory where logs will be stored, and is configurable to your preference. stdout
is a static value that'll be prepended to all file names in the log folder.
Run your request and open the log file.
Additional information on the ASP.NET Core module: ASP.NET Core Module
Don't forget to disable logging once done!
You can try to start your application directly on your IIS Server via the console.
dotnet myapp.dll
You should get a much more verbose error there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With