Difference of standard publish and adding cloud services with vs2012 - azure

I wonder if someone can help? I'm trying to deploy a mvc app to azure and have followed the what appeared to be simple instructions of selecting publish from my mvc app and using the imported azure profile. This all worked fine and with a couple of tweaks the site is working, after some testing I'm getting a 500 error, I've set the logging on but this doesn't help much.
After looking around I see that I can rdp to the site but this requires a web role and a different sort of publish am I missing something from the standard publish or do I need to add the cloud service stuff to my project?

Related

"403 - This web app is stopped" when deploying to Azure from VSCode

I have a web app, ironradio.org, that I've deployed on Azure from VSCode. I've made some updates to the site and am now trying to deploy the newest version. Now when I try to deploy using this button:
I get the error 403 - This web app is stopped in the output window:
I've already deployed several versions of the site using the same method and it's never failed before. Also, the app is definitely not stopped because I can still browse to the site and it shows up.
My best guess as to what's going on is that I associated the App Service with a new resource group since the last deployment, so maybe VSCode isn't recognizing that? Does anyone have any idea what's going on here?
I tried the link given in the error message, but it wasn't much help.
Microsoft foreseen this type of error and how it can affected its customers greatly and this is why the deployment slot is for you.
Firstly, you have to delete the app and reupload again except you set up continuous deployment which work mostly with GitHub and other version control platforms.
Apart from this, I will suggest you check out the deployment slot docs. It’s very simple and easy to use
https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots

.NET5 Blazor Server app in Azure App Services returns "You do not have permission to view this directory or page"

I am trying to deploy a Blazor Server app using .NET5 to an Azure App Service via Azure DevOps.
The Blazor app runs and works correctly locally. The Azure DevOps pipeline appears to also be building and deploying correctly. If I use the console in the Azure portal I can see that the files I would expect are in the wwwroot folder (which I guess is correct?). In Configuration > General Settings I can see that the App Service is correctly configured for .NET 5. On the network side there are currently no access restrictions. I've also turned off all auth in the app for now just to make sure that wasn't having an impact.
When I try to access the site at https://my-app.azurewebsites.net (not the real url, just an example in case it's relevant) I get a white page with the following text: "You do not have permission to view this directory or page.". When I look in the Diagnostics dump from the Kudu page I can see more detail error pages which say 403.14 - Forbidden and the message "The Web server is configured to not list the contents of this directory.". If I look in App Insights for the times when I try to access it I can see requests with 403 response too (for some reason with url: http://localhost/). Unfortunately this error seems to cover a multitude of errors and so while I've found various sources with similar problems, none of the solutions I've found so far have had any positive impact.
EDIT: So I did some more digging and I think some files might be missing. I tried creating a new Blazor Server app and publishing it manually via Visual Studio. This worked and the only difference I've found from my app is that I have no web.config, hostingstart.html, or static css/js etc (from wwwroot). None of these files are in the output directory when I build for either my app or the test app I created so it looks like they must be getting added separately by something in the VS manual publish process and Azure DevOps publish step isn't doing it. Still not sure what the correct way to fix this is (or even entirely sure if any or all of this stuff is relevant).
Has anyone out there got any idea what I might be missing?
So after working out what was going on here I was going to delete this but I figured possibly someone else will make the same mistake I did and this might help. Basically I'd copied another deployment pipeline for an Azure function app as the basis for the deployment pipeline for this and in that I just did a dotnet build and that's enough. However it seems for this kind of app to get wholesome output you need to run dotnet publish.

Web app on azure doesn't show my asp.net core web app after I have published it without any problems

Landing Page of my web app
I have published my asp.net core mvc project in the Azure as web app, however it doesn't show anything. Instead of this it just shows the landing page as there was no code (which is not the case). I have checked few points on stackoverflow, but couldn't find anything, could anyone please help me with that?
There are few reasons causing it, you could refer to the following and troubleshoot it.
Go to your kudu site to check whether all your project file have uploaded to azure.
After publishing webapp to azure, wait for a moment.
Make sure you default page is listed in here and is above hostingstart.html
Deploy Continuous to Azure App Service.
Update:
Delete app and republish it.

How do you add authentication credentials to a web test on the AZURE portal?

I have a web app written in Node and hosted as an Azure web app. I have setup Application Insights web tests for other sites that do NOT require auth and these work fine. Now I need to test a route that requires authentication, but it is not obvious how to do this on the Azure Portal. Can this actually be done? I have seen some posts about doing this through Visual Studio but I really want to avoid that if at all possible.
As per the article here - https://learn.microsoft.com/en-us/azure/application-insights/app-insights-overview - if you don't want to touch code (and hence, redeploy) you cannot do what you are asking in the question.
Looks like diving deep into code is the only way

Missing deployment tile from Api App blade in Azure Portal

I'm in the process of evaluating App Service and in particular Api apps and logic apps. I want to be able to make use of git deploy for an Api app instance.
This article https://azure.microsoft.com/en-gb/documentation/articles/web-sites-publish-source-control/ mentions that even though it is based on web apps, you can apply the same processes to api apps, however, when I attempted to follow the tutorial using an api app instance, I was unable to see the "deployment" tile on the api app blade in the azure portal. I was able to complete the tutorial for the web app instance.
Does anyone know why I wouldn't be able to see the deployment tile for an api app blade?
I want to use the api app so I can make full use of swagger and the logic app service.
Edit
Thinking about it, do I even need to use an api app or could I get away with using a web app (with swagger meta data) for connecting to logic apps?
Update
Found it - see my own answer.
OK, I found it and it's not a bug. I was being (a bit) dumb. Following this article, I discovered that I needed to click on the Api app host section and then all settings then continuous deployment.
This is, imho, a poor UX decision here, given the blade looks exactly the same as others that do have the deployment tile, but at least I can set up git deploy for my api apps now.
#Simon
This may be a bug - I will poke the Azure Team for it asking that. Even though, WebApp, APIApp and MobileApp are EXACTLY the same service, only changing name. So, if you can see deployment tile for one of them, you should be able to see all others then.
BUT, there is a "invisible business link" around them that make all things working. When you work with Logic Apps, it will search for custom API Apps at - guess what! - you API App list. So, you can host a API application at WebApp, but probably the Logic App will not go for it by default.

Resources