azure-web-roles

Disable IIS Idle Timeouts in Azure Web Role

只谈情不闲聊 提交于 2019-12-03 18:35:56
问题 To prevent AppPool recycling every 20 minutes, I'd like to remove IIS AppPool Idle Timeouts when my Azure Web Role starts. My website is a Web Application Project. How do I do this? 回答1: Create a startup task to disable the idle timeout: In the website project referenced by your web role project, add a file Startup.cmd to the root folder. In the properties for Startup.cmd , set Copy to Output Directory to Copy if newer . Add this line to Startup.cmd : if exist %windir%\system32\inetsrv\appcmd

Azure CDN - Enabling HTTP 304 Caching with ETag - Hosted Web Role

折月煮酒 提交于 2019-12-03 14:55:23
We are trying to enable HTTP compression (gzip) and HTTP 304 Caching via ETags on Azure CDN. We already discovered an issue with enabling Azure CDN Compression , but now we can't get compression and ETag caching ( 304s ) working simultaneously. This issue has been posted to Azure forums here . Here is an example of the compressed , but not HTTP cacheable (304) link: https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA&group=core.js Here is an example of the cacheable (304) , but not compressible (gzip) link: https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA

Compile MVC and Pre-Compile Views And Deploy Into Azure WebRole

泄露秘密 提交于 2019-12-03 14:47:56
So I have the following requirements: 1. Compile a large MVC app and pre-compile all of its views. 2. Run transforms for web.config 3. Package and publish for deployment into Azure Web Role I can do 1 with a modified proj file, 2 works if I us msdeploy, and 3 works fine when I use the VS 2012 Azure tools. Now I want to put these all together into a scripted process. Has anyone already done the leg work to get this running? 1) /p:PrecompileBeforePublish=true 2 + 3) You need to add the following MSBuild target in your .ccproj to copy in your transformed Web.config file (using Web.Release.config

Environment.GetEnvironmentVariable(“RoleRoot”) returning null when called in a WebRole

ⅰ亾dé卋堺 提交于 2019-12-03 14:40:13
I have a method (in a separated class library) which is called by a WebRole and a WorkerRole. This method contains the path of a file, which is returned using Environment.GetEnvironmentVariable("RoleRoot") , as follows: private string FooPath() { string appRoot = Environment.GetEnvironmentVariable("RoleRoot"); return Path.Combine(appRoot + @"\", @"approot\file.foo"); } When I call this method from a WorkerRole the path is returned normally. But when I call it from a WebRole I get null . Any ideas? EDIT: I am using APNS-Sharp to send push messages to iOS and it requires a .p12 certificate in

Build error after upgrade Azure SDK from 2.4 to 2.6

冷暖自知 提交于 2019-12-03 14:37:32
I just upgraded my web role project (and solution) from Azure SDK 2.4 to Azure SDK 2.6 using the upgrade functionality under project properties > application. When I am building my application, everything works well but when I try to run it (and start up the Azure emulator and such) it gives the following error when I click "NO" if I want to proceeed with build errors: unable to get setting value Parameter name: profileName See build output: Nothing more. When I open my output I can not find anything related to this. It looks like the build is done successfully. If I click "YES" VS serves a

how to get blob-URL after file upload in azure

让人想犯罪 __ 提交于 2019-12-03 09:24:36
I'm trying to connect web and worker role. So i have a page where user can upload video files. Files are large so i can't use the query to send files. That's why i'm trying to upload them into the Blob Storage and then send the url by the query. But i don't know how to get this url. Can anyone help me? Gaurav Mantri Assuming you're uploading the blobs into blob storage using .Net storage client library by creating an instance of CloudBlockBlob , you can get the URL of the blob by reading Uri property of the blob. static void BlobUrl() { var account = new CloudStorageAccount(new

Does Azure offer https for “cloudapp.net”?

此生再无相见时 提交于 2019-12-03 06:44:39
问题 One great advantage of using Azure Websites is that I can get secure HTTP (HTTPS) without doing nothing: I simply type https://xyz.azurewebsites.net and it works. I don't have to worry about certificates because I use the subdomain that Azure gives me (in the example it would be xyz ) So, what I usually do is that people come by through some registered domain I have, eg. http://www.my-application-homepage.com , and there, if they want to use my application, I redirect them to the subdomain at

Azure Web Role “warm up” strategies [closed]

随声附和 提交于 2019-12-03 02:02:11
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I found that making requests to our web role after periods on inactivity would result in a very slow request (up to 30 seconds). After that initial request, the role would perform as it should. After much Googling, I came across four different strategies (listed below): (a)

How can I test multiple Web Role instances in Windows Azure?

China☆狼群 提交于 2019-12-02 21:28:27
问题 Background: I've deployed an MVC3 application to 2 Azure Web Role instances, but I'm confused as to how I can test out the possibility of one of these instances failing. Is there a way that I can test to ensure that my Web Role code works seamlessly when one of my instances is taken offline? Can I manually stop one of them? Or somehow configure the load balancer to force all traffic to one of the servers? Thanks! 回答1: If you have RDP access enabled to your instances you can very easily remove

Does Azure offer https for “cloudapp.net”?

空扰寡人 提交于 2019-12-02 21:17:13
One great advantage of using Azure Websites is that I can get secure HTTP (HTTPS) without doing nothing: I simply type https://xyz.azurewebsites.net and it works. I don't have to worry about certificates because I use the subdomain that Azure gives me (in the example it would be xyz ) So, what I usually do is that people come by through some registered domain I have, eg. http://www.my-application-homepage.com , and there, if they want to use my application, I redirect them to the subdomain at azurewebsites.net , using HTTPS. Now, having said that: I'm in need of upgrading to Azure Cloud