azure-web-sites

How to prevent Azure webjobs from being swapped in Azure website production <--> staging slots

倖福魔咒の 提交于 2019-11-27 02:09:42
问题 I have an Azure website with a production and staging slot with multiple instances. I run several Azure webjobs on the site, some of which are triggered others that are continuous. I understand triggered webjobs will only run once on one instance. My current setup is: Production site has no deployment other than swapping from staging Staging website is setup to continuous deployment from bitbucket Webjobs are deployed from within VS to production slot using "publish to Azure" (since AFAIK

Azure WebSites - Can't Scale Sites Individually (New Web Hosting Plan Groups)

早过忘川 提交于 2019-11-27 02:09:01
问题 Just this morning, the management portal for Azure WebSites no longer lets me scale individually. It looks as though all my websites have been grouped into a "Web Hosting Plan". And now when I create a new web site, I have to choose a plan. I've looked around and I can't find any information on "Web Hosting Plans" -- is this some preview function that got pushed out early? Does anyone know how to create a new plan and switch a website to it? 回答1: The ability to move a site to a new or

How to prevent an Azure website from going to sleep?

核能气质少年 提交于 2019-11-27 02:05:09
问题 I deployed an ASP.NET 5, MVC 6 web application to Azure. It seems that if I don't hit the site for 10-15 minutes, it goes to sleep and it takes a good 10-15 seconds for it to wake up. I am not sure whether its the website that's falling asleep, or the database that it's connecting to. So 2 questions. How do I prevent the site from going to sleep so soon. Is there a way to have visibility into what's going on in Azure with the website and the database. Are they kicked out of memory? 回答1: Azure

Trouble getting ClaimsPrincipal populated when using EasyAuth to authenticate against AAD on Azure App Service in a Asp.Net Core web app

元气小坏坏 提交于 2019-11-27 02:01:39
We have a web app built on Asp.Net core. It doesn't contain any authentication middleware configured in it. We are hosting on Azure App Service and using the Authentication/Authorization option (EasyAuth) to authenticate against Azure AD. The authentication works well - we get the requisite headers inserted and we can see the authenticated identity at /.auth/me. But the HttpContext.User property doesn't get populated. Is this a compatibility issue for Asp.Net core? Or am I doing something wrong? Yes, this is a compatibility issue. ASP.NET Core does not support flowing identity info from an IIS

Azure Websites Kudu REST API - Authentication

喜你入骨 提交于 2019-11-27 02:01:05
I'm trying to use PowerShell to put an updated content file onto an Azure Website via the REST API. However, when supplying my credentials into Invoke-RestMethod -Credentials I am returned the HTML of the standard Azure login page. How can I authenticate with Kudu from PowerShell? Thanks. You can first get the website via Powershell and then use the publish credentials from the website to call the Kudu REST API. The example below will get the Kudu version. $website = Get-AzureWebsite -Name "WebsiteName" $username = $website.PublishingUsername $password = $website.PublishingPassword

Is there a way to view deployed files in Azure?

馋奶兔 提交于 2019-11-26 23:59:47
问题 Is there a file "view" available in Azure? When I log in to azure to look at a website I've deployed there is no obvious way I have spotted to see exactly what files Azure is hosting. I'd love to be able to see exactly what files are there. I can see there's the Visual Studio Online option which allows you to live edit your server code but that is more than I need. I just want to be able to check that certain files are deployed and others are not. 回答1: If you're just trying to look around,

Azure Apps EasyAuth claims with .NET Core

老子叫甜甜 提交于 2019-11-26 23:34:31
问题 I want to write some ASP .NET Core middleware to turn the Azure Apps EasyAuth HTTP headers into claims. I've found two ways to do it: Parse the token that EasyAuth provides in the HTTP header. This doesn't seem like a generic solution as I'd have to write code to parse tokens for every identity provider. Make a server-side request to /.auth/me. This returns some JSON which I'd like to convert to claims but I'm not sure if I have to do this manually or there is framework support for it. Is #2

Change Azure website app settings from code

扶醉桌前 提交于 2019-11-26 23:05:43
Is it possible to change the app settings for a website from the app itself? This is not meant to be an everyday operation, but a self-service reconfiguration option. A non-developer can change a specific setting, which should cause a restart, just like I can do manually on the website configuration page (app setting section) It wasn't that hard once I found the right lib to do it, Microsoft Azure Web Sites Management Library . var credentials = GetCredentials(/*using certificate*/); using (var client = new WebSiteManagementClient(credentials)) { var currentConfig = await client.WebSites

How do I enable PUT requests in Azure?

雨燕双飞 提交于 2019-11-26 22:08:05
问题 I'm building a REST API on Azure, but when I try to access an endpoint via the PUT method I get a HTTP 405 "Method Not Allowed" status along with an IIS error message: The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used. How do I enable the PUT method, and other methods that may be blocked by default by Azure's default config settings? I tried adding a web.config file to the root of my application with allowUnlisted set to true on the verbs

How does the Azure Web Apps architecture look like?

℡╲_俬逩灬. 提交于 2019-11-26 21:56:46
问题 I've had a few outages of 10 to 15 minutes, because apparently Microsoft had a 'blip' on their storages. They told me that it is because of a shared file system between the instances (making it a single point of failure?) I didn't understand it and asked how file share is involved , because I would assume a really dumb stateless IIS app that communicates with SQL Azure for it's data. I would assume the situation below: This is their reply to my question (I didn't include the drawing) The file