Part 3- Deploy to Azure -Build a Instagram like clone called Chymin using ASP.net Core and Angular9
Ok in this part lets deploy to azure and then we can continue building out our App. After this we will start with the client side that will consume our API and each section we will build incrementally. In this part we will do some code clean up as well.
Go to your project right click and selection publish
Choose azure app service
you will need to add your credit card for verification but choose the free version and use the free tier..
Next let finish and then configure SQL server database
Click add and add a new database
Click new database server and follow instruction
Just follow instruction and you should be able to create your account. Then you will need to click publish
Now because my target is 5.0 i get this issue below. Here is how i resolve it.
HTTP Error 500.30 — ASP.NET Core app failed to start
Common solutions to this issue:
- The app failed to start
- The app started but then stopped
- The app started but threw an exception during startup
Troubleshooting steps:
- Check the system event log for error messages
- Enable logging the application process’ stdout messages
- Attach a debugger to the application process and inspect
For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028265
Go to Publish -> action — edit
Select deployment mode(self-contained)
Unfortunately, this is did not work for me and to avoid any other issues i just decided to stick with the current stable version and downgraded. This is what we can do.
Right click on your project → and go to Properties select 3.1
Then go to click on the project name and open up the csproj file change targeted version
re-build and re-publish. One thing to note you will need to re-configure your database settings. Just go though the steps and answer the questions.
I was able to publish successfully and going forward i will use that version.
Due to live coding this is the last minute change
It works….now we will proceed. Hope it works for you !!!
Next we will refactor our code and continue the Journey! thank you for joining me on this Journey.