树莓派部署.net core网站程序

1、发布你的项目

使用mobaxterm上传程序

回到mobaxterm,f进入目录输入: cd webpublish 运行程序:dotnet WebApplication1.dll

访问地址为:http://localhost:5000,尝访问如下:

已经出现 返回的json,证明是可以访问的,部署成功了!但默认只能在树梅派中访问,如果web要在别的内网电脑通过IP访问是访问不了的。需要进行以下设置

启动命令 改成

dotnet WebApplication1.dll --urls=http://*:5000

说明:UseUrls(http://*:5000) 即可实现通过IP访问程序。如 http://192.168.1.101:5000

相关推荐
The Future is mine1 天前
.Net Core 在Linux系统下创建服务
linux·运维·.netcore
*长铗归来*2 天前
ASP.NET Core Web API 中控制器操作的返回类型及Swagger
后端·c#·asp.net·.netcore
IDOlaoluo2 天前
VS2017 安装 .NET Core 2.2 SDK 教程(包括 dotnet-sdk-2.2.108-win-x64.exe 安装步骤)
.netcore
csdn_aspnet10 天前
使用 Entity Framework Code First 方法创建 ASP.NET Core 5.0 Web API
.netcore·webapi
小先生81210 天前
.NET Core项目中 Serilog日志文件配置
c#·.netcore
爱吃香蕉的阿豪10 天前
.NET Core 中 System.Text.Json 与 Newtonsoft.Json 深度对比:用法、性能与场景选型
数据库·json·.netcore
csdn_aspnet10 天前
ASP.NET Core 10.0 的主要变化
.netcore
csdn_aspnet13 天前
在 C# .NETCore 中使用 MongoDB(第 1 部分):驱动程序基础知识和插入文档
mongodb·.netcore
csdn_aspnet13 天前
在 C# .NETCore 中使用 MongoDB(第 3 部分):跳过、排序、限制和投影
mongodb·c#·.netcore
csdn_aspnet14 天前
在 C# .NETCore 中使用 MongoDB(第 2 部分):使用过滤子句检索文档
mongodb·c#·.netcore