azure-web-sites

Azure Web App deploy: Web Deploy cannot modify the file on the destination because it is locked by an external process

心不动则不痛 提交于 2019-11-27 13:39:29
问题 I am using the "Azure Web App Deployment" build step in VSTS to publish an ASP.NET Core API to an Azure Web App: Occasionally, this step breaks with the following error: [error]Microsoft.Web.Deployment.DeploymentDetailedClientServerException: Web Deploy cannot modify the file 'MyProject.Api.exe' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the

Adding custom properties for each request in Application Insights metrics

情到浓时终转凉″ 提交于 2019-11-27 12:05:45
I d'like to add custom properties to metrics taken by Application Insights to each request of my app. For example, I want to add the user login and the tenant code, such as I can segment/group the metrics in the Azure portal. The relevant doc page seems to be this one : Set default property values But the example is for an event (i.e. gameTelemetry.TrackEvent("WinGame"); ), not for an HTTP request : var context = new TelemetryContext(); context.Properties["Game"] = currentGame.Name; var gameTelemetry = new TelemetryClient(context); gameTelemetry.TrackEvent("WinGame"); My questions : What is

Using a LocalDb MDF file on Azure

和自甴很熟 提交于 2019-11-27 12:01:47
I am developing an ASP.NET MVC website, which I want to host on Azure Websites. While in development, I have been using an MDF file in my App_Data directory with a connection string looking like this: <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=MyApp;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MyApp.mdf;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" /> To try it out on Azure, I was hoping I could leave this connection string as is, and simply FTP my MyApp.mdf into the App_Data folder on Azure, since it is all

Azure Website slow to serve static JS/CSS but not binary

心已入冬 提交于 2019-11-27 11:31:58
问题 I have an Azure Website/Web App that is incredibly slow to serve static JS and CSS files but seems perfectly fine serving binary. To test the problem I uploaded two 30MB files, one big.js and the other big.rar . The JS file downloads at around 100KB/s if I'm lucky. The RAR file downloads at around 4,000KB/s. The results are extremely consistent. I've checked in Fiddler and gzip compression is occurring in both cases. As expected, the JS file is being sent with the MIME type application/x

Will “Always On” setting prevent BOTH idleTimeout and periodicRestart?

丶灬走出姿态 提交于 2019-11-27 09:15:16
Has you may know, Web sites hosted under Microsoft Azure Web Sites service are by default configure to timeout after idling 20 minutes (idleTimeout) and the application pool to restart every 29 hours (periodicRestart). This cause the web site to be slow for the first user accessing it. I would like to know if the new "Always On" setting available on standard mode will prevent both situation from happening. I found a few articles mentioning the feature, they are all very clear that the idle timeout will be avoided but none of them explicitly talks about the periodic restart: One of the other

Upgrading Node on an Azure website?

橙三吉。 提交于 2019-11-27 08:39:27
I'm trying to run some pre deployment tasks (unit tests etc) with NPM on an Azure website, however the version of node on the VM is v0.10.32, the current version of node is v4.2.4. I have non administrative access to the command line via the SCM website, no RDP etc. Is there any way to upgrade? You can specify the version of node that the app is running on using the package.json file. Add: "engines":{"node":version} e.g.: "engines":{"node": "0.12.x"}, More info: https://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/ Ensure the Azure Web App has the

Process.Start in Azure Website

半城伤御伤魂 提交于 2019-11-27 08:09:11
问题 I have an ASP.NET MVC 5 app where I need to invoke wkhtml2pdf.exe in my Azure website using Process.Start . Locally everthing works fine. But it seems my app stuck at Process.Start line. Is starting a process is supported on Azure? 回答1: ramiramilu's answer is actually not correct. You can run any exe you want (check this for example). The problem you are hitting is not in running an exe, it's something specific to wkhtml2pdf.exe itself. That exe uses a bunch of GDI+ calls on Windows for

Accessing uploaded certificates in azure web sites

空扰寡人 提交于 2019-11-27 07:36:39
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>(); var store = new X509Store(StoreName.My,StoreLocation.LocalMachine); store.Open(OpenFlags.ReadOnly);

Running Node.js on Azure Web App

眉间皱痕 提交于 2019-11-27 07:30:10
问题 I am trying to run a very simple node.js server on an Azure Web Appp to serve a single page application. The server will serve up static pages, and will always server 'index.html' for page requests as all the routing is done client side. All works absolutely perfectly locally, but when deploying to Azure, any page requests result in a 'the resource you are looking for has been removed...', which suggests the node server isn't being hit. I am using Koa as the server, and the server.js is here;

Where to put SQLite database file in Azure App Service?

有些话、适合烂在心里 提交于 2019-11-27 06:47:25
问题 Q1 : Where do you think is the right place to put a SQLite database file ( database.sqlite ) in Azure Web App file system? For example: D:\home\data\database.sqlite D:\home\site\database.sqlite D:\home\site\wwwroot\database.sqlite other? Q2 : What else should be taken into consideration in order to make sure that the database file won't be accessible to public users as well as not being accidentally overwritten during deployments or when the app is scaled up/down? (The Web App is configured