azure-web-sites

CORS headers missing when deployed on Azure Web App / Azure API

烈酒焚心 提交于 2019-11-29 19:50:52
问题 I have created an OWIN hosted WebAPI 2 . There's also a web app ( AngularJS ) that's using the API and acting as a client. I've added the necessary code for the CORS to the Startup.cs , and hosted it in local IIS on a port different than the client and confirmed that it fixes the Cors issue. Then, I deployed both apps to Azure (I've put both on the Azure as Web App, and I also tried putting the OWIN to the Azure API that is currently in preview) but - the preflight request now fails (no

How to connect a localdb from Visual Studio to the published Azure web app?

匆匆过客 提交于 2019-11-29 17:15:29
So i have a localdb set up for my project in Visual Studio but when I publish it to my Azure web app, I get " An unhandled exception occurred while processing the request. Win32Exception: The system canot find the file specified TryGetConnection" I tried adding a "DefaultConnection" Connection String with the database/server as the value in the Web App settings but that didn't do anything yoape LocalDb doesn't exist for Azure. LocalDb is a feature of SQL Server Express, there is no equivalency of that on the service (machine) you are deploying your App Service website on. There are plenty of

RequireHttpsAttribute with .NETCore RC2 causes HTTP302 redirect loop on Azure

随声附和 提交于 2019-11-29 16:56:37
I've been trying to get a .NETCore RC2 web app working on Azure with the RequireHttpsAttribute set but I'm having issues. To remove the possibility of this being a problem that I've introduced with my code, I cut things back to the bare minimum and recreated it using the "out of box" VS2015 .NETCore RC2 template. If I deploy the standard VS2015 .NETCore RC2 web app the site runs fine. If I then add [RequireHttps] to the controllers it works fine locally, but on Azure it causes an HTTP302 redirect loop. This seems to be something which has changed since RC1 since the RequireHttpsAttribute works

Which versions of node.js are available on Azure Web Sites?

試著忘記壹切 提交于 2019-11-29 16:50:18
问题 I already know how to change the version of Node.js running on an Azure website, but how do I see what the available Node.js version are that can be used in Azure? This is similar to this question, but the asker there explicitly wants to know the version that is currently running, not what versions are available. 回答1: Open Advanced Tools (Kudu): In Kudu, click on Runtime versions : At the time of writing (August 2017), you'll see something like this: { "nodejs": [ { "version": "0.10.18", "npm

Rename an Azure App Service plan

谁都会走 提交于 2019-11-29 16:35:15
问题 Is it possible to rename an App Service Plan ? I have already tried in both the old and new portals and can't find any rename options. 回答1: No, you can't. However, if you create a new App Service Plan in the same region and resource group then you can move all your sites to the new App Service Plan and delete the old one. 回答2: No but you can change it like this (if it is in the same region and resource group as mentioned by Zain Rizvi): Create a new App Service Plan and bind it to the correct

Azure WebJobs and Deployment Slots

匆匆过客 提交于 2019-11-29 16:33:02
问题 What will happen when I deploy a continuously running Azure WebJob with a QueueTrigger (queue connection defined in app.config) into a Deployment Slot (for example "Staging")? Will it start to run and listen to messages in the queue or will only start in the Production slot? My fear is that if will just start processing messages from the queue even tough its not in the Production slot yet. If this is the case, should the queue connectionstring be moved from app.config into Azure Website

Phantomjs renders black boxes on Azure Websites

≯℡__Kan透↙ 提交于 2019-11-29 16:10:47
Using latest Phantomjs binaries v1.9.7 on Azure websites, it renders black boxes instead of character. here is an example of simple phantomjs script on Azure: var page = require("webpage").create(); page.content = "Hello 123"; page.render("index.png"); phantom.exit(0); the png and pdf result is [] [] [] [] [] [] [] in black And the jpg result is big black box This prevent us from using phantomJS as a webjob and within websites Note : phantomjs is working fine on VM,WebRole and WorkerRole PhantomJs uses GDI+ APIs from Windows for creating fonts and vectors in PNGs and PDFs which is,

How to list all running webjobs within an azure subscription using powershell

一世执手 提交于 2019-11-29 15:38:21
I have an azure subscription that has upwards of 200 appServices where around about half of them have Continuous, always on webJobs attached, some also have slots which also have webJobs. Is there a way to list all webJobs that are inside a subscription? I was originally tring to use powershell to do this but it was getting rather complex and was wondering if anyone knew of an easy way to achieve the above. It seems like Get-AzureRmWebApp should be able to help but i cant find a way to list the jobs that reside inside the webapps. I found the command Get-AzureWebsiteJob which is not in the

Can I easily stop/start Azure Webjobs without going through the UI or FTP?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 15:01:29
问题 The Azure management interface is abhorrently slow to load up the web jobs list, and the new portal just times out and fails 95% of the time. We have a lot of WebApps (often deployed per region) in Azure running web jobs. It's extremely cumbersome and slow to have to go through the UI to do all this. I know that the Kudu API offers start/stop mechanisms for web jobs and you can just drop a file called 'disable.job' in the job folder to stop it, but these all require going through the

Express Applications throwing 500 on azure

≡放荡痞女 提交于 2019-11-29 14:44:07
The following code runs perfectly locally... var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send("Hello World"); }); var port = 8080; app.listen(port, function () { console.log('Server started and is listening on port ' + port); }); But when i deploy it to azure I get a 500 error. Here is my findings... I have taken this advice Have tried all possible combinations of server.js, app.js, directory structure etc. The code is being deployed from a local git repo. Azure Web Apps (web sites) listen on ports 80 and 443 only. You can not listen on port