azure-web-sites

Socket IO net::ERR_CONNECTION_REFUSED

早过忘川 提交于 2019-12-11 04:55:11
问题 I am trying to implement socket.io into my application which is hosted at Azurewebsites. webapp Here is the server.js var app = require('express')(); var server = require('http').createServer(app); server.listen(process.env.PORT || 3001) app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); var io = require('socket.io')(server); io.on('connection', function (socket) { console.log("Socket connected :"+socket.id); socket.emit('news', { hello: 'world' }); }); And Here

Azure Web Application Monitoring Alert doesn't fire

孤街浪徒 提交于 2019-12-11 04:46:36
问题 I have configured an Azure Web Application Monitoring rule such that if there are more than 30 requests over a five minute period, then an alert should fire which should both send me an email and trigger a webhook. Problem is, the alert doesn't fire even when the parameters for the alert are clearly satisfied. I took a screenshot of the traffic graph after I made over 30 requests to the server within a five-minute window. I've also included the specific configuration menus for this alert. How

Use client certificate from Azure Website instance

时间秒杀一切 提交于 2019-12-11 04:27:46
问题 I have an Azure Website instance that needs to connect out to a WCF service running elsewhere that is secured using a client certificate. Client -> Azure Website (MVC Controller) -> WCF Service (Not Azure) that requires Client Certificate I have been supplied a CER file that when installed locally allows my website to connect to the WCF service. How do I install/make available this certificate available on the Azure Website? All the documentation I've found when researching this is all about

Set an appsetting value conditionally in an ARM template

余生长醉 提交于 2019-12-11 04:26:11
问题 We have an Azure ARM template, which is adding appsettings for a Microsoft.Web/site. "resources": [ { "apiVersion": "2016-03-01", "name": "myazurefunction", "type": "Microsoft.Web/sites", "properties": { "name": "myazurefunction", "siteConfig": { "appSettings": [ { "name": "MY_SERVICE_URL", "value": "[concat('https://myservice-', parameters('env'), '.domain.ca')]" } ] } } } ] We also have four parameters.environment.json files. For instance, this is the content of parameters.dev.json . { "

Is there a way to enable application logging to blob for azure app service using PowerShell or ARM template?

江枫思渺然 提交于 2019-12-11 04:11:05
问题 We enable application logging to blob for azure app service in the Azure portal. Is there a way to do this using PowerShell or ARM template. If yes, please provide sample code. 回答1: Is there a way to do this using PowerShell or ARM template. If yes, please provide sample code. We use the powershell command Set-AzureRmResource -Properties to do that. We also could get the command from https://resources.azure.com/ . It works correctly on my side. Login-AzureRmAccount # get the log setting

ASP.NET Core Azure App Service httpContext.Request.Headers[“Host”] Value

ⅰ亾dé卋堺 提交于 2019-12-11 03:53:51
问题 Faced strange behaviour today. We are hosting asp.net core 1.1 web app with Azure App Services and using subdomains that route to a specific controller or area. So in my SubdomainConstraint: IRouteConstraint I use HttpContext.Request.Headers["Host"] to get host name. That previously returned smth like that mywebsite.com or subdomain.mywebsite.com Starting today (or a maybe yesterday) it started to return my App Service name instead of host name. On localhost everything works fine. Enumerating

Disabling request validation on Azure Websites

落花浮王杯 提交于 2019-12-11 03:47:32
问题 My node.js application runs nicely on my own machine, however, after pushing it up to an Azure WebSite using Git, I'm getting request validation problems. Some of my requests are trapped by the IIS validation process. The fix is to add this to the web.config: <httpRuntime requestPathInvalidCharacters=""/> I downloaded the web.config from the site\wwwroot folder of my website using FTP, added it to the repo, added the new element in the XML, and pushed it back up to Azure. My web.config file

How to npm configuration options (such as --scripts-prepend-node-path) when deploying to azure web sites?

眉间皱痕 提交于 2019-12-11 03:38:38
问题 I used following in package.json when deploying to azure web site: { "name": "mypackage", ... "engines": { "node": "6.11.1", "npm": "4.2.0" }, ... } Everything worked fine but I also got following warning: npm WARN lifecycle The node binary used for scripts is D:\Program Files (x86)\nodejs\6.9.1\node.exe but npm is using D:\Program Files (x86)\nodejs\6.11.1\node.exe itself. Use the --scripts-prepend-node-path option to include the path for the node binary npm was executed with. Finished

How to get the usage metrics data for the Web Application Service?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 03:34:14
问题 I am trying to execute the REST API to get the usage metrics data from Web Application deployed on Azure. Hi, I am trying to execute the REST API to get the usage metrics data from Web Application deployed on Azure. https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Web/sites//metrics?$filter=startTime%20eq%202016-04-12T06:05:42.907Z%20and%20endTime%20eq%202016-04-12T06:10:42.907Z&api-version=2014-04-01 But I am getting constantly 500 Internal Server Error. Also,

Encrypt Database Connection String in Azure Websites

喜你入骨 提交于 2019-12-11 03:18:17
问题 Is it possible to encrypt a database connection string and deploy it to a Windows Azure Website? (NOT a Windows Azure Web Role) If so, how? The reason I ask is because I can't find examples or documentation anywhere as to how to perform this specifically with Azure Websites. (I'd like to use the "Shared" web site mode) I have found the following resources, which come close to what I want, but utilize Web Roles instead of Websites: http://archive.msdn.microsoft.com/pkcs12protectedconfg http:/