简体   繁体   English

如何在 AWS 上托管 ASP.NET 核心 Blazor WebAssembly 托管应用程序?

[英]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?对于以前从未使用过 AWS 的人,如何在 AWS 上安全地托管托管 Blazor WebAssembly 应用程序(其中有 3 个项目,即服务器、客户端和共享)(.NET Core 6.0)? 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)?用于托管 static 网站的方法是否适用于 Blazor wasm 托管(我认为它们不会,因为我还需要托管服务器,但我只是确保我了解所有内容)? Should I consider just getting a linux instance and hosting it there or there is an easier route?我应该考虑只获取一个 linux 实例并将其托管在那里还是有更简单的方法?

You can of course use EC2.您当然可以使用 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.对于 WASM 项目,您可以使用 S3。 For the API you can use Lambda.对于 API,您可以使用 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.在 inte.net 上搜索一些视频教程,现在您有关键字可以找到它们。

I'd suggest an EC2 instance of a windows server machine.我建议使用 windows 服务器计算机的 EC2 实例。 The EC2 control panel should show you how to connect to the server with an RDP client. EC2 控制面板应向您展示如何使用 RDP 客户端连接到服务器。 You will also need to configure the inbound rules in an AWS security group and apply it to your server.您还需要在 AWS 安全组中配置入站规则并将其应用于您的服务器。 One of the rules should be RDP and set to you development machine's IP address.规则之一应该是 RDP 并设置为您开发机器的 IP 地址。 You might want to add an AWS elastic URL to your site too.您可能还想将 AWS elastic URL 添加到您的站点。 Connect using the RDP client and create your site in IIS. Make sure you download and install the.Net core hosting bundle?使用 RDP 客户端连接并在 IIS 中创建您的站点。确保您下载并安装了 .Net 核心托管包?

https://do.net.microsoft.com/en-us/download/do.net/thank-you/runtime-as.netcore-6.0.3-windows-hosting-bundle-installer 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.然后,在 visual studio 中,右键单击服务器项目和 select 发布。 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. 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.对于托管,如果我可以推荐,您可以查看 Asphostportal。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Fargate 如何处理其中托管的 ASP.NET Core 应用程序的健康状况? - How does AWS Fargate handle the health status of ASP.NET Core app hosted in it? ASP.NET AWS 中托管的 Core 6 应用程序 Lambda function URL 处理程序 - ASP.NET Core 6 app hosted in AWS Lambda function URL Handler 哪个端口是我在 AWS Fargate 中运行的 ASP.NET Core 6 应用程序 - Which port is my ASP.NET Core 6 app running on in AWS Fargate 如何为 EBS 创建 AWS 代码管道以部署在 ASP.NET Core 5.0 和 Angular - How to create AWS code pipleline for EBS to deploy on ASP.NET Core 5.0 with Angular 使用 Azure B2C、.NET Core 和 Blazor Webassembly 的 Google One Tap SignIn - Google One Tap SignIn with Azure B2C, .NET Core and Blazor Webassembly 如何读取Service Fabric Azure App Configuration ASP.NET Core Stateless Web API? - How to read the Azure App Configuration in Service Fabric ASP.NET Core Stateless Web API? 从ASP.NET Core访问Azure App Service ConnectionString - Access Azure App Service ConnectionString from ASP.NET Core .NET 5 ASP.NET 核心应用程序未在 Azure 中启动 - .NET 5 ASP.NET Core App not starting in Azure ASP.net 核心 docker https on Azure 应用服务容器 - ASP.net core docker https on Azure App Service Containers 命名信号量在 Azure App Service 上托管的 ASP.Net Core 5 Web API 上不起作用 - Named semaphore not working on ASP .Net Core 5 Web API hosted on Azure App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM