英文:
An error occurred while processing your request. ASP.NET Core 5.0
问题
请帮助我解决这个问题,当我尝试在Azure上部署我的网站时,尽管我的 ASP_ENVIRONMENT
设置为 Production
,仍然出现此问题。请逐步帮助我解决在Azure上的部署。
英文:
Please help me solve this issue once I am trying to deploy my website on Azure while my ASP_ENVIRONMENT
set to Production
still getting this issue. Please help me solve my deployment on Azure step by step
答案1
得分: 1
HDLCAMPUS6275\\SQLEXPRESS
是本地 SQL 服务器,这就是你遇到此问题的原因。
如果你有公共 IP,你可以像下面这样更改连接字符串:
Data Source=public_ip,1433;Initial Catalog=FoodHub;Persist Security Info=True;User ID=sa;Password=Anunay@123;encrypt=true;TrustServerCertificate=True;Max Pool Size=100
你应该在本地使用 SQL Server Management Studio (SSMS) 进行测试。
相关文档:
1. 如何配置 SQL Express 2012 以接受远程连接
3. 如果你没有公共 IP,你可以使用 ngrok 进行测试
然后你的问题应该会得到解决。
英文:
HDLCAMPUS6275\\SQLEXPRESS
is on-premise sql server, that's why you get this issue.
If you have the public ip, you could change the connectionstring like blow.
Data Source=public_ip,1433;Initial Catalog=FoodHub;Persist Security Info=True;User ID=sa;Password=Anunay@123;encrypt=true;TrustServerCertificate=True;Max Pool Size=100
You should test it in your local by using the sql server management studio(SSMS).
Related docs:
1. How to configure SQL Express 2012 to accept remote connections
2. Generate or find Connection String from Visual Studio
3. If you don't have public ip, you could use ngrok for test
Then your should be fixed.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论