I'm trying to deploy my .net 5.0 targeted framework project via plesk panel. When I connect the plesk panel's database in my local system in debug mode the web site works just fine. My migrations sent to database automatically and created the tables. But when I publish my project it gives 500.30
error.
HTTP Error 500.30 - ASP.NET Core app failed to start
Common solutions to this issue:
The app failed to start
The app started but then stopped
The app started but threw an exception during startup
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
Since all I can access is just a panel, I can't view Windows Event Viewer
or anything related to error's detail.
I tried to get the detail in startup.cs
with :
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseDeveloperExceptionPage();
//do more things...
}
But it still shows only 500.30 page.
I tried in Program.cs
:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder
.UseStartup<Startup>()
.CaptureStartupErrors(true)
.UseSetting("detailedErrors","true");
});
But again it shows only the 500.30 page.
I thought it might be a framework version problem and tried to publish my project self contained to avoid the error (plesk panel uses 32 bit windows) :
dotnet publish --self-contained true -r win-x86
But it didn't help either.
I know this error might be caused by many reasons. I just need to see the detail of the error to fix it. Hope you can help me.
Thank you all for your time for even reading this.