azure-web-sites

Accessing uploaded certificates in azure web sites

寵の児 提交于 2019-11-26 13:44:05
问题 When I was using the web role I was just uploading the certificate in azure portal and I was able to see it .Now I have switched to the website in azure and I uploaded the certificate in the azure management portal but my code does not see it at all. Is there some configurations we need to do or some other way to access uploaded certs in azure web sites. This is how I am trying to access the uploaded cert . private List<string> GetAvailableCertificatesFromStore() { var list = new List<string>

Azure Websites Kudu REST API - Authentication

守給你的承諾、 提交于 2019-11-26 12:30:40
问题 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. 回答1: 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

Rewriting a URL in an Azure web app

不想你离开。 提交于 2019-11-26 11:26:44
问题 I have a simple wildcard routing rule I want to apply for my Azure web app. <rule name=\"MyRule\"> <match url=\"*\" /> <action type=\"Rewrite\" url=\"/index.html\" /> </rule> Do I have any option here given I can\'t RDP into the machine and fiddle with IIS? This is not an ASP.Net website, it\'s a simple SPA application. 回答1: You need to create a web.config file in your wwwroot folder and put the relevant config entries there. Here's an example of an web.config rule, to give you an idea of

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

六眼飞鱼酱① 提交于 2019-11-26 09:52:22
问题 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

Change Azure website app settings from code

做~自己de王妃 提交于 2019-11-26 07:48:27
问题 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) 回答1: 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*/);

Publish Multiple Projects to Different Locations on Azure Website

China☆狼群 提交于 2019-11-26 05:27:19
问题 Feel free to recommend a better title or changes to my explanation below! I am using Windows Azure Websites (for the first time) and have connected it to a solution in Visual Studio Online (also my first time). I was also able to connect to Visual Studio Online, create a project, throw up a master page and web form connected to a master page and my Azure website updated itself. Great! My Issue If I add another project to the solution it seems that this new project overwrites the files in the