You don’t show your authentication code, but I suspect it has the bug.
Note: it alway a best practice to test locally if deployment fails.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have an ASP.NET 6 project that's working just fine when I have it running on my local machine, but when I publish up to AWS Elastic Beanstalk, it can't find any views. I've tried explicitly adding the views to the build, added MvcRazorCompileOnPublish
to the csproj file, and tried setting the build to explicitly use x64, and none of these have fixed the issue. Is there any other steps I may have missed to make this publish properly?
You don’t show your authentication code, but I suspect it has the bug.
Note: it alway a best practice to test locally if deployment fails.
there was a bug in the razor compiler before sdk 6.0.300. be sure you have the latest updates.
show us:
dotnet --list-sdks
and the vs 2022 version you are using.
@Bruce (SqlWork.com)
Currently using .NET 6, upgraded from .NET Framework 4.7.2. I'm not sure if the default authentication was used or not, but I assume it was. I'm unsure as to if the deploy is source or binary, as I just use the AWS Toolkit for VS to deploy.
The files in the publish folder look to be the same as the files being sent to AWS.
what version of asp.net core are you using? did you use default authentication or create your own authentication forms? what type of AWS deploy are you doing (source, or binary)?
you should do a folder publish locally and test. then compare this folder structure to the AWS deployed structure.
note: the default authentication uses razor pages built into the dll.
Hi, @Benjamin Sims
I created a new ASP.NET Core MVC application with .NET 6 in Visual Studio and used the AWS Toolkit for Visual Studio to "Deploy to ElasticBeanstalk (Legacy)".
It was successfully issued as below.
So it's probably your project's problem, not ElasticBeanstalk's problem.
Does the same problem occur when you create a new project?
If it doesn't happen, you have to compare the minimal project that succeeds with your project that fails.