简体   繁体   中英

How do I get my SQL Server database to work with my deployed REST API on Azure?

I containerized my .NET Core REST API app with Docker, ran it locally and everything worked fine. However, now that I deployed my container to Azure (using Container Instance), my API endpoints are not responding anymore. All of my endpoints query from my SQL Server database which I think could be the problem since my server name is my home IP config.

I am at lost as to what to do to try to make my SQL Server work with my deployed app.

Do I create a SQL Server on Azure, then connect my local SQL Server to Azure, then configure my app to that hosted SQL Server instead? Or is there another way?

Thanks in advance.

As far as I know, you can use following options:

  1. You can connect your on-premises computers and.networks to a virtual.network using Azure VNet .

  2. Migrate your on-premises SQL Server to Azure SQL Database according to this doc .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM