I am a new web developer and am trying to host a test site with Azure test services.
I can see the test site(you can access this to test ) at: http://kencast20160830102548.azurewebsites.net/
However, if you go to the Services -> Fazzt --> Equipment and Applications pages, I get this error:
Error. An error occurred while processing your request. Development Mode Swapping to Development environment will display more detailed information about the error that occurred.
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable toDevelopment, and restarting the application."
These pages are relying on a SQL database, so I think this is where the problem is.
I've been trying to follow along with the directions published here: https://docs.asp.net/en/latest/tutorials/publish-to-azure-webapp-using-vs.html
however I cannot find the "Configure SQL Database" pop-up box when logged into my Microsoft Azure account.
The directions do not seem to go along with what exists in Azure.
Update- 8/31/2016
I have researched and learned a bit more: I have one project with two DBContexts.
When I publish to Azure, it publishes tables from ApplicationDBContext but not the tables from MyCompanyContext. I can verify using SQL Server Object Explorer. I can see my local connection strings in appsettings.json file for both ApplicationDB and MyCompanyDB. Here is the code from appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-MyCompany-3097a012-5e00-4c25-ad83-2730b4d73b4b;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Data": {
"MyCompanyContext": {
"ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=MyCompanyContext-f9de2588-77e8-41dd-abb3-84341610b31a;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
}
However, when I look at the "SQL Server Object Explorer" window, I see that the database hosted on Azure, mycompanydb.database.windows.net(SQL Server 11.0.9231 -mycompanydb, MyCompany_db) only has the tables from the "DefaultConnection" database, and nothing from "MyCompanyContext".
How do I get the tables from the second database (MYCompanyContext) to Azure?
I have been studying this Stack Overflow response, but it uses Enable-Migration in the PMC. When I do that, I get an error that enable-migrations is obsolete.
Locally, I have always done migrations with this: add-migrations -c MyCompanyContext
Any help you could give me would be greatly appreciated.
Thanks!