azure-web-sites

Azure website Rest Api only accept GET, POST returns 403. Possibly CORS

人走茶凉 提交于 2019-12-24 00:54:45
问题 I am encounter a strange problem. I have a Asp.net Core WebApi project running under Azure App Service (Website). I am using DHC plug-in in Chrome. My service is also running with AAD. I can request a GET method just fine (After login). However, when I request any POST, I got a 403 response. Looking around in the log, I can see this 2016-07-28T08:14:26 PID[x] Verbose Received request: POST https://blahblah.azurewebsites.net/api/build/beep/ 2016-07-28T08:14:26 PID[x] Verbose Found

Programmatically set Azure App Service application settings / environment variables

血红的双手。 提交于 2019-12-24 00:45:43
问题 I have an ASP.NET Core (RC1) app running on Azure App Service. The app takes its configuration from environment variables. I currently use the Azure Portal's 'Application Settings' page to set these environment variables. The app is deployed with Kudu (if this is relevant?) I would like a way to programmatically set these environment variables so that I don't have to go through the Azure Portal every time I want to create a new environment variable or modify an existing environment variable.

How to Avoid Azure App Service Plans to Scale Down Automatically

孤人 提交于 2019-12-24 00:43:00
问题 I would like to ask you if there is a way to avoid App Service Plans from Azure to scale down automatically. For instance, I configured an App Service Plan with the following pricing tier: Basic: 1 Medium; nevertheless, if my app is idle for some time the pricing tier of that App Service Plan changes to Shared. I do not know if that is a standard behavior, financially it makes sense; however, from a technical point of view, I do need at least a Basic Service Plan at all times since I am using

Delete and upload files into Azure webapp local storage programatically

邮差的信 提交于 2019-12-24 00:24:26
问题 I've deployed a website into Azure and i want to access programaticaly this path : "D:\home\site\app" from a c# desktop application and delete all files and upload new ones programatically. i have searched and found many ways but all are for AzureStorage or using Kudu consol or FTP while what i realy want is to access the local storage where the website is deployed programatiacally, and make some edits on files programatically. 回答1: Sure thing, the Site Control Manager (Kudu) has an API for

404 Page works on localhost but not on production (Azure Web App)

这一生的挚爱 提交于 2019-12-24 00:15:09
问题 I have a 404 page on my localhost which works just fine. However, when it's pushed to Azure Web App, it does not. I pushed it originally through the Publish tool, and right now I use the built in feature that pushes from a branch in Github. I have the following web.config : <system.web> <customErrors mode="On" defaultRedirect="~/Error/Index"> <error redirect="~/Error/NotFound" statusCode="404" /> <error redirect="~/Error/Index" statusCode="500" /> </customErrors> <!-- More stuff :-) --> <

VS 2015, C# 6, MVC5, Roslyn — 502 gateway errors on Azure web app

时光毁灭记忆、已成空白 提交于 2019-12-23 23:29:15
问题 I'm in the process of diagnosing this issue and I will update as I learn more but I wanted to post what I have in case there's a quick fix/someone's seen this already. I have a MVC5 project, .NET 4.5.2, Visual Studio 2015. I recently started using C# 6 so in order to get Razor to work I had to install the CodeDOM compiler Nuget package. Everything works on my local machine (of course it does). My current stable Azure site is on a Git commit that is NOT using C# 6, but is using .NET 4.5.2 and

running headless chrome in an microsoft azure web app

荒凉一梦 提交于 2019-12-23 23:10:43
问题 I am currently using phantomjs to generate screenshots of web pages. Due to various issues including web fonts, and video tag support, I would like to try switching to headless chrome. Has anyone had success running headless chrome in an azure web app? I cannot find a .net api, and assume I need to run node.js with puppeteer If I want a javascript api similar to phantomjs. 回答1: Right now most of the big libraries are made for NodeJS. It's possible to run Chrome headless without it, but you'll

Easy way to build and deploy (to Azure) ASP.NET 5 in Visual Studio Team Services

与世无争的帅哥 提交于 2019-12-23 21:51:26
问题 I have create a sample ASP.NET 5 application (pretty much the example one from New Solution), and pushed it to GIT hosted on Visual Studio Team Services (former Visual Studio Online). I want to set up continuous integration to Azure Web App (former Azure Web Site). I have tried to set it up from Azure portal itself, it did create a new build definition, but it fails to build ASP.NET 5. I have found a guide how to do this, but it never really worked for me, I get errors like this e.g. Error

Loading Azure certificate when NOT using custom domain names

ε祈祈猫儿з 提交于 2019-12-23 21:33:20
问题 As I understand if someone doesn't want to use a custom domain name and instead plans on using *.azurewebsite.net domain assigned to the website by Azure, then HTTPS is already enabled with a certificate from Microsoft(I know this is not as secure as using a custom domain name). How would be I able to load this certificate programmatically. Currently I use the following method to load a certificate from local machine or Azure : public static X509Certificate2 LoadFromStore(string

Serving static files in ASP.NET 5 MVC 6

别说谁变了你拦得住时间么 提交于 2019-12-23 18:44:02
问题 My wwwroot static files aren't being resolved. I understand that to serve static files, I need to put them in wwwroot: favicon.ico resolves just fine, but schema/v1-0.json does not. I get the generic message: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. I have the following wired up in Startup : app.UseMiddleware<StaticFileMiddleware>(new StaticFileOptions()); app.UseStaticFiles(); I am using DNX beta6. The above require beta5