我是 .net 的新手,我有一个运行良好的 Web 应用程序,问题是我想从它打开它,Ip Address
而不是localhost
让 LAN 上的每个人都可以访问它。我将它替换为它localhost
使用它打开Web应用程序,但它不会连接到但是当我使用它打开它时它可以正常工作。非常感谢任何帮助。IP
launchsetting.json
IP
Database
localhost
Database
数据库:SQLEXPRESS 18。
这是我的launchsetting.json
文件:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51911",
"sslPort": 44374
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"ReactC_MDSS": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
这是我的 DB 连接字符串的 appsetting.json 文件:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"patientDB": "Data Source=DESKTOP-FE7Q19U\\SQLEXPRESS;Initial Catalog=MDSS;Integrated Security=True"
}
}