emonney / QuickApp

ASP.NET Core / Angular startup project template with complete login, user and role management. Plus other useful services for Quick Application Development
https://www.ebenmonney.com/quickapp
MIT License
1.26k stars 594 forks source link

Internal 500 error when deploying to production #139

Closed anthony-baron closed 5 years ago

anthony-baron commented 5 years ago

Hello,

We recently cloned this template and stood up an Azure database. We were able to successfully connect to the new DB in development. However, after deploying to production, we are receiving an internal 500 error. The connection strings were changed in the appsettings.json & appsettings.Development.json files (both the same).

Does anyone have any insight as to what the issue is. Let me know if any other information is needed to help solve the problem

tonydrake commented 5 years ago

have you updated "ApplicationUrl": "https://xxxxx.azurewebsites.net", in appsettings.json?

Also - setup login on the webserver - you should see the exception come through.

Finally, I assume the SQL is a SAAS SQL in sure, there is config there around security - you may need to enable 'other services' - I can't remember 100% - but on your local build, you should be able to connect to the azure hosted DB, even if this is not set (so you symptom of running from Dev OK, but not in production. Also, make sure the users / security are all there in the DB - my early attempts had a empty DB in Azure, and I had to run the local version with Azure connection string to 'seed' the DB before the 1st deploy...

anthony-baron commented 5 years ago

Was totally the application url! Thanks for the advice