Reputation: 621
I'm trying to publish my ASP.NET application now that I have upgrade3d everything to .NET 6 and am getting a 403 error.
This application has been running for months or more on .NET 5 and I have published countless times without a problem.
The project has been upgraded (TargetFramework, etc.) all Nuget packages are at 6 and the Hosting Bundle for .NET 6 in installed on the server (dotnet --info verifies).
The app compiles and runs locally and the publish process (after fighting with it all day) seems to work-ish (with this latest problem being the end of the line (so far).
Anything I can check or change?
Upvotes: 3
Views: 1722
Reputation: 621
In my case, this was caused by the deletion (via publish + delete existing files option) of the web.config file (which I don't maintain locally (no need).
While it seems weird that the publish process doesn't generate or at least warn of the absence of this file, simply recreating it on the sever with very basic information resolved the problem for me.
I now keep a copy of that file handy and a note to replace it when I have a need to publish with delete.
Upvotes: 2