I deployed a Asp.Net Core 2 application to Azure, using Visual Studio Community's Publish
feature. The non-database-dependent parts of the application function, but the database-specific code returns an error.
The application's database is a Sql Server instance installed on a Windows server hosted on a Azure VM (not an Azure SQL database).
To fix this, I:
- determined the application's IP address using the Url property (xxx.azurewebsites.net) of the app's blade
- added an inbound rule to the network security group's blade that allows all ports from this IP address
- added an entry to the VM's Windows firewall to allow ports from this IP address
Unfortunately, this did not solve the problem. What am I missing?
Incidentally, what's the recommended way to set the ASPNETCORE_ENVIRONMENT
to development when publishing to Azure (to enable more-detailed error messages)?