Does .Net Serverless Support Views?

0

When I create an AWS Serverless application using the Visual Studio templates, it uses AddRazorPages for a website and AddControllers for api. Would it work if I changed this to AddMvc or AddControllersWithViews or do AWS Serverless only support Pages? I managed to get this working locally in Visual Studio, but I wanted to make sure it will still work once published to AWS, since I know the hosting environments are completely different, and I found it odd that there was no VS template that uses Views.

Eric
질문됨 2년 전220회 조회
2개 답변
1

Switching to AddMvc or AddControllersWithViews is fine for the ASP.NET Core Lambda projects. The templates just default to the leaner methods by default.

AWS
Norm
답변함 2년 전
0

Hello ,

Thank you for reaching out to us.

There is a template for ASP.NET Core Web App which supports rendering pages. Please refer to this link [1] for more information on blueprints.

If you face any issue implementing it, can you please send me your conversion or a sample of your conversion.

Hope this helps.

References:

  1. https://github.com/aws/aws-lambda-dotnet/blob/master/README.md#blueprints
AWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠