Cannot see Deployment Source options in Azure Portal - azure

I'm writing this simple answer to help others that would otherwise have had to spend hours getting confused by every tutorial out there.
My issue:
Newbie to Azure web apps and have been trying to learn how to deploy via GitHub. Every tutorial and video I checked out showed that as soon as you create a Web App then go to the Deployment options screen it lets you choose how you want to deploy it.
However I was not seeing this in mine - it was as if it was pre-configured for me but there was no ftp or GitHub option showing.

Solution:
The problem may be because I had used the node.js empty template to create my web app and it preconfigured something for me (though I don't see why this should be the case); but in any case I went to the Deployment options screen, pressed the Disconnect button. Waited then hit settings, and hey presto I finally got to where all the tutorials were talking about.

Related

nestjs deployment using vscode to azure app service

This is my first nestjs application (or any nodejs application for that matter) and I'm having trouble deploying it to a "production" environment. Steps I've followed:
1) I installed the Azure extension for VS Code
2) I click the blue up arrow icon in VS Code to initiate the deployment
3) The first time I tried, I had manually created my node JS application from portal.azure.com and chose that app service from the list, it didn't work
4) the second time I tried it, I created a new app service from the deployment process in VS Code
5) The application deploys and I get a deployment successful message. If I expand deployments under my new app service in the azure extension in VS Code, I see the deployment and when I select that, I get a log that finishes with this screenshot:
6) I try hitting an endpoint on my nestJS api from postman and I get an application error message that has a link to https://mywebsite.azurewebsites.net/detectors to troubleshoot. When I click that link, it fails to load in the azure portal
7) I read somewhere that I need to include my nodeJS version on the app service so I tried adding that - see screenshot below:
8) I can see the files if I use the SSH tool from the azure portal
a couple things to mention, I've read a few things that suggest I need to do something with "tsc"? in my package.json file. Since this is my first time doing anything with nestjs/nodejs, I have no clue what that means. I have not modified my package.json file (at least the scripts section) at all from how it comes out the box. Is there something I need to adjust there? Is there something I need to change on azure? I'm really liking nestjs a whole lot, but getting it to work in on my "real" server is proving to be a challenge...
any help is greatly appreciated.
TIA

Azure App Services Web App not registering update

I have a Azure App Service app that I'm trying to get deployed.
Today I ran into an issue where .NET informed me (via the yellow screen of death when I browse to the URL of my app) that I had a missing DLL (for the purposes of this question I don't think it really matters).
I used FileZilla to publish my changes in an attempt to do a manual deployment first and then work my way to automate it.
After so many attempts to fix it I later realized that the error message never changed. I did something more severe and renamed my bin folder into something completely different and the exact same error message would appear.
I've stopped the service, restarted it, and as mentioned, renamed folders, etc. and still the exact same error message persisted.
I also decided to open up the Azure Portal Console for my App Service app to browse a bit and to my amazement, nothing seemed to have reflected at all. The FTP shows one thing and the Console shows another.
Would anyone have any idea as to why this is happening?
I eventually got it to work and I will share what I tried.
I deleted the web app and created it again (I found this to be important the first time around). This was quite time consuming and did help but it wasn't long before the same problem happened again.
Then I finally found a solution that seems to give me consistent results:
I kept on editing the Web.config which seems to force a recompile and clear some sort of cache. So each time the web app stopped updating, I would make a slight change in the Web.config, upload it via FTP and the app finally updates.
If anyone has any more details on this, it would be greatly appreciated.

Waiting for bot to be ready after deployment

Situation 1
I wrote my own bot framework and deploy to Azure,
the Test in Web Chat shown me "Waiting for bot to be ready after deployment".
Situation 2
I downloaded the source code from Azure bot Services,after that I deploy back to Azure, the Web Chat shown me "Waiting for bot to be ready after deployment".
I also faced this issue and this is how I solved it.
Changed my publish settings to have Remove additional files at destination checked. This is an important step because when you provisioned a new web app bot, it will already have some files in the location. So when you publish your code, it will be placed along with the code files which already exists. You can also test it by navigating to the /api/messages url. If this gives you error, then this is most likely the case.
I also updated all the NuGet dependencies.
The other thing that caused me a bit of issue was the App Password. The app password in your web.config should match the one which is already generated for your BOT. Do not create a new password from the bot management page. If you did that then make sure that you change/update the password in web app bot application settings and also in the web.config file. When you host the bot, by default it will use the Application Id and Application Password which were generated automatically. You can see these values in the Web App Bot service type which is under the section App Service Settings>Application Settings. Scroll down to the bottom and you will see these two settings. Copy the values of Application Id and Application Password and update them in the Web.config file.
Hope this help!
What fixed it for me was changing Destination URL in Publish Settings to https. For some reason default is http.
I had missing node packages that I wasn't aware of. I found the errors in the output logs at https://[bot-name-here].scm.azurewebsites.net/dev/wwwroot/:vs.output
Or you can Navigate to this by going to Build -> Click 'Show output' (or Shift+Command+U) (its the 5th icon in the left hand side menu on the Build window)
Hope that helps!
Some ideas to troubleshoot for people having the same error:
Check that the server hosting your bot is actually running. If https://YOUR_BOT.azurewebsites.net is timing out, then your server is not running, check your config
Check if you have logs in the App Service: Enable everything under App Service > Diagnostic logs, then go to App Service > Log Stream.
Check potential errors under Web App Bot > Channels > Web Chat > Issues
Check that the files on the server look ok by going to App Service > App Service Editor (Preview)
Close all your browsers, especially if they have been running for a long time and/or you have been changing a lot of config/files recently
I fixed the issue by using a combination of those points
I had the window open for a few days, and "Test in Web Chat" would just show "Waiting for bot to be ready" and the juggling progress indicator, forever. I duplicated the tab and it came right up. I think my session may have expired or something, because any new, duplicated tab, I could bring the bot up in just fine.
I solved the problem by, in Visual Studio's Solution Explorer, setting the .bot file's property "Copy to Output Directory" to "Copy always"."
The details: The bot worked fine locally in the emulator. After deploying to Azure (continuous deployment), "Test in Web Chat" hung with "Waiting for bot to be ready". (Would be nice if it detected and reported errors.)
After setting up Azure storage, turning on Azure logging, discovering the FileNotFoundException, inspecting with Resource Explorer, and deploying multiple bot versions, I isolated the cause. This document really helped me troubleshoot:
https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-dotnet-visual-studio#a-nameapptracelogsacreate-and-view-application-trace-logs
I also experienced this problem but the solution I have is totally different from the suggestions above.
I created my Knowledge Base and Web App Bot purely using the portal. The problem lies with the configuration. As of writing, the Bot Template: Node.js > Question and Answer does not work. I needed to create a new Web App Bot and I selected instead C# > Question and Answer.
That fixed my problem and allowed me to use the Test in Web Chat feature.

Docker on Azure .Net Core WebApi with continuous deployment - did it work?

I followed the following: https://www.visualstudio.com/en-us/docs/build/apps/aspnet/aspnetcore-to-azure and everything appears to work just fine. My build work and my Dev release was successful.
At the end of the documentation it says:
When the release has completed, browse to your web site, refresh the
page, and see that the change has been deployed.
But I have no idea what that url is? How do I tell where that is or if everything did in fact work? Sorry for the dumb question, I have never worked with any of this before - thank you.
That's the URL you choose for your web app before.
See step 5 in the previous step "Define and test your CD release process":
After the release is complete, navigate to your site running in Azure using the Web App URL http://{web_app_name}.azurewebsites.net, and verify its contents.
You can try following this guide: https://blogs.msdn.microsoft.com/webdev/2016/11/16/new-docker-tools-for-visual-studio/
By doing it with Visual Studio, it creates by itself the complete pipeline which you can then modify or extend.
In the case you would like to have more than one service I recommend following this guide: https://learn.microsoft.com/en-us/azure/container-service/container-service-setup-ci-cd
Both guides helped me to understand how ACS works, also will be worth watching the Docker section in the Visual Studio Lunch Keynote :)

Azure Mobile Services on Local IIS rather than IIS Express

OK, I've created an Azure Mobile Services project in Visual Studio 2013.
I run it up as-is, then in the browser I test it by adding a todo item via the simple browser app that seems to get baked into these service projects. It gives me a '201 success' message - brilliant.
I then convert the project from IIS Express to Local IIS as the web host, recompile and try again, and although I get the same smiley face app telling me that everything is OK, when I try and add a todo item I get a 404 error. This is contrary to the Microsoft article that gives these instructions, which clearly says I am able to choose either IIS Express or Local IIS when setting up the project.
My guess is that web.config is missing something when this project runs on the local IIS server.
I'm hoping someone already has a solution before I spend hours trying to work out how to configure IIS for this type of project.
I've already wasted a load of time working through loads of bugs and gotchas with Azure Mobile, and I'm starting to run out of steam - so I'm hoping someone can help me before I go and grab an account at Parse.com
Many thanks in anticipation.
Dean
The easiest approach for your situation might be to just deploy to the cloud, and use that service for your testing. Visual Studio 2013 Update 2 makes it easy to deploy your app and connect to it for remote debugging. It is a little slower than using a local instance, but you are also assured that there will be no surprises when you eventually go live (since you are live the whole time).
That said, we will investigate the issue you are seeing with using IIS directly. Some things you might want to try on your own:
Verify that you can view the web side from your Mac's browser, to make sure that the firewall is letting the requests through.
Try using the "Getting Starting" link from the smiley-face page, to see if the REST endpoints are behaving correctly.

Resources