I tried to publish my ASP.NET Core application on Windows Server 2008 R2 but I get this error: "An error occurred while starting the application."
Without any more description!
What can I do?
I tried to publish my ASP.NET Core application on Windows Server 2008 R2 but I get this error: "An error occurred while starting the application."
Without any more description!
What can I do?
Please take a look at this post: https://scottsauber.com/2017/04/10/how-to-troubleshoot-an-error-occurred-while-starting-the-application-in-asp-net-core-on-iis which will give you a good starter kit to get basic log informations when this kind of error appear.
It may be a bad startup configuration or related to the .NET Core runtime installed but very difficult to say without more technical information.
<aspNetCore stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
Could not create stdoutLogFile C:\inetpub... ErrorCode = -2147024891.
in my case it works fine from another drive but it does not work with C:\inetpub\website I suppose this is kind of security permissions trouble.
If it does not help you should at least see the logs that lead you further.
Although i'm Administrator on the pc and other websites under .NET Framework 4.7.1 are running OK from C:\inetpub\ the asp.net core site has the issue
Althouth there many things that could go wrong and the proper way is to actually troubleshoot the error, my case was simpler:
I forgot to configure the release output path for Swagger
You can to that by following these steps:
PropertiesBuild tab Output section check the XML documentation file checkbox. This will autocomplete the path with an XML file, but you can change that to whatever you want.
I copy-paste the solution from https://mycodepad.wordpress.com/2018/08/23/publishing-asp-net-core-an-error-occurred-while-starting-the-application/