azure-web-sites

How to check if code is running on Azure Websites

↘锁芯ラ 提交于 2019-11-28 00:44:26
I knew that we can use RoleEnvironment.IsAvailable to check if code is running in Web/Worker Role. How about Azure Websites ? I tried the above RoleEnvironment code but it always returns false. I need to run some configuration code in Application_Start so I cannot depend on the request stuff. Any help is appreciated. This is actually very easy simply check for existence of this environment variable: WEBSITE_SITE_NAME . !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME")) The content for this will be the name of your site. To see more environment variable that you have

Azure website cannot access Azure DB

隐身守侯 提交于 2019-11-27 23:49:00
This error drives me crazy and I can't even reproduce it! I've published my website to Windows Azure and SQL Azure and it worked great. All the sudden and it doesn't work, I get this nasty error: Here is the error I get: http://jsfiddle.net/shimmy/pcS7g/embedded/result Here's the error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error

Where is “download publish profile” in the new Azure Portal?

感情迁移 提交于 2019-11-27 23:28:43
In the old Azure Portal, I used to download the publish profile (which included FTP username/password) for App Services using the menu shown here. How do I get this in the new Azure Portal? Ultimately, how can I get my FTP user/pass for my App Service? it is right on the website`s blade. and regarding to FTP address and username, you should be able to see the details from setting --> properties I found it just in the main menu under Overview. Yeah, hidden firstly so you need to click ...More. Just Here "Get Publish Profile" 来源: https://stackoverflow.com/questions/34191234/where-is-download

ABCpdf .NET with Azure App Service

烂漫一生 提交于 2019-11-27 22:43:26
问题 I am trying to use ABCpdf .NET with Azure App Service and getting the following error when generating a PDF. Unable to render HTML. Failed to configure IE 9 or above for the MSHtml engine: Access denied while writing to the registry. For IIS applications, please enable "Load User Profile" or consult MSHtmlBootstrap in the documentation. Usually in a VM I would set Load User Profile to True and it works but in Azure App Service, I do not have access to IIS Application Pool configuration.

Disable chunking in Asp.Net Core

痞子三分冷 提交于 2019-11-27 22:11:42
I'm using an Asp.Net Core Azure Web App to provide a RESTful API to a client, and the client doesn't handle chunking correctly. Is it possible to completely turn off Transfer-Encoding: chunked either at the controller level or in web.config? EDIT: I'm returning a JsonResult somewhat like this: [HttpPost] [Produces( "application/json" )] public IActionResult Post( [FromBody] AuthRequest RequestData ) { AuthResult AuthResultData = new AuthResult(); return Json( AuthResultData ); } This took me all day, but I eventually figured out how to get rid of chunking in .Net Core 2.2 The trick is to read

Where to save/extract files on Azure Web Sites?

痞子三分冷 提交于 2019-11-27 21:58:22
问题 I have web application for running unit tests for our data and I want to deploy it as Azure Web Site. The problem is in this app I'm downloading quite large zip files, extracting them (~50MB, 500 files inside) and doing some tests over these files . Where should I save these large files on Azure Web Sites and where hould I extract them? On localhost I've been using "Path.GetTempPath()", but Azure Web Site is reporting that there is no space in this folder, even though my Azure Site has 1000MB

Is it possible to run ASP.NET 5 site directly on Kestrel in Azure WebApps?

℡╲_俬逩灬. 提交于 2019-11-27 21:23:20
问题 I have checked that in the web response the server is IIS when I deploy ASP.NET5 to azure web app, so I guess the IIS platform handler is used to redirect it to Kestrel. So I am wondering if it is possible to run directly on Kestrel, and what benefits/drawbacks will that have (probably regardless if it's in Azure or not). I suppose it will be a bit faster since IIS will be excluded from the pipline, but it should not be too much overhead I suppose... 回答1: On Azure Web App, you cannot bypass

Azure WebJob timeout configuration settings

ε祈祈猫儿з 提交于 2019-11-27 21:19:00
问题 We have an Azure web site with a daily scheduled job. In our case, the scheduled job runs a stored procedure that takes about 10 minutes so there is no local processing. Our web job is terminating after about 4 minutes with this error. Command 'cmd /c ...' aborted due to no output and CPU activity for 121 seconds. You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue. We've tried adding the following app settings to the web job's app.config file: <appSettings> <add key="SCM

App pool timeout for azure web sites

隐身守侯 提交于 2019-11-27 20:07:47
is there a way to set the timeout of an app pool of a web-site running under azure sites. I have a site running there and it seems like it needs to spin up again when it has been idle for a while. Windows Azure Web Sites supports two modes, shared and Reserved. In Shared mode, your web site process (w3wp) runs alongside other, sharing resources including CPU and memory. The runtime (that is Windows Azure Web Sites system) remove sites from memory after period of idleness – that is when your site doesn’t get any traffic. The runtime make the decisions removing sites, bases on many parameters,

How to Get Error Details of an ASP.NET 5 app deployed on Azure Websites?

偶尔善良 提交于 2019-11-27 18:58:17
I have an ASP.NET 5 solution with a website and several project libraries. I'm using MVC 6 and Entity Framework 7. Locally the app is working fine and until today it was working also on Azure deployed as an Azure Website. But today after the latest deployment on Azure I got an error 500 like this on the startup (still working fine locally): I tried to get more details by : using middleware diagnostics adding the customError / httpError settings in the web.config file downloading the DetailedError page generated It seems that the error/exception is happening during the Startup/Configure step