硬件:Raspberry Pi 3B

系统:Windows 10 IOT Core

应用:.Net Core Web

部署流程

1. 系统安装

1.1 下载并安装 Windows 10 IoT Core Dashboard,使用该工具将 Flash.FFU 映像文件刷入 SD 卡。

https://docs.microsoft.com/en-us/windows/iot-core/downloads

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

1.2  Flash.FFU 映像刷入完成后,即可插入树莓派进行 Windows Iot 系统启动。 

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

2. 应用发布

2.1 创建 .Net Core Web 应用,添加 5000 端口监听地址(这里硬编码为Demo测试用)。

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

2.2 配置发布参数:

Target Framework = netcoreapp 3.0
Deployment Mode = Self-Contained
Target Runtime = win-arm

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

3. 应用部署

3.1 启用 Windows IoT 的 FTP 管理,将发布文件上传至 Raspberry Pi。

使用 PowerShell 或者 Device Portal 运行命令:

start C:\Windows\System32\ftpd.exe

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

3.2 配置防火墙。

使用 netsh 工具配置防火墙,命令:

netsh advfirewall firewall add rule name=”ASP.NET Core Web Server port” dir=in action=allow protocol=TCP localport=5000

3.3 启动应用

在 Raspberry Pi 上切换至上传后的 .Net Core Web 目录,运行 .exe 启动应用。

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

3.4 访问应用

[IOT] - Raspberry Pi 3B + Windows 10 IOT Core + .Net Core Web 部署

参考资料

https://www.cnblogs.com/zhanggaoxing/p/8452249.html

相关文章:

  • 2021-09-25
  • 2022-12-23
  • 2021-11-06
  • 2022-02-03
猜你喜欢
  • 2021-05-22
  • 2021-11-06
  • 2021-12-15
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案