简体   繁体   中英

How to host an ASP.NET Core Blazor WebAssembly Hosted App on AWS?

What to do to safely host a Hosted Blazor WebAssembly App (Which has 3 projects ie Server, Client and Shared) (.NET Core 6.0) on AWS for someone who has never used AWS before? Which instance would be best? do I have to worry about the different projects or all I need to do is host the server app? and will the methods used for hosting static websites work for Blazor wasm hosted (I think they won't because I also need to host the server but I'm just making sure I understand everything)? Should I consider just getting a linux instance and hosting it there or there is an easier route?

You can of course use EC2.

There is also serverless solutions. Serverless mean you don't have to take care about the operating system, this mean you don't have to handle setup, updates, security...

For WASM project you can use S3. For the API you can use Lambda.

With these two solutions you don't have to handle the server and you pay only what you consume.

Search the inte.net for some video tutorials, now you have the keywords to find them.

I'd suggest an EC2 instance of a windows server machine. The EC2 control panel should show you how to connect to the server with an RDP client. You will also need to configure the inbound rules in an AWS security group and apply it to your server. One of the rules should be RDP and set to you development machine's IP address. You might want to add an AWS elastic URL to your site too. Connect using the RDP client and create your site in IIS. Make sure you download and install the.Net core hosting bundle?

https://do.net.microsoft.com/en-us/download/do.net/thank-you/runtime-as.netcore-6.0.3-windows-hosting-bundle-installer

Then, in visual studio, right click the server project and select publish. You might find it easier the first time, if you publish the project to a local folder and copy all the published files to the website folder on your server.

Have you used Cloud before? If you are familiar with cloud, then you can use them. But if you are quite new in development, I believe you can just use shared hosting. My suggesstion, better go with Windows hosting to host your Blazor and .NET Core 6. But, it all depend on you, I'm more familiar with Windows, so I use Windows hosting. For hosting, if I can recommend, you can take a look at Asphostportal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM