azure-web-sites

Azure website keeps throwing the error “An attempt was made to access a socket in a way forbidden by its access permissions”

无人久伴 提交于 2019-12-10 00:57:02
问题 I have a website running as a web app on a dedicated Azure plan. It connects to a Redis, SQL Azure and a MongoDB backend. The website has been running fine for weeks now and then without any new code I am now getting lots of socket exceptions starting like the one below. An attempt was made to access a socket in a way forbidden by its access permissions. The website intermittently gets the error when connecting to Redis, SQL Azure and MongoDB which makes no sense. I changed the Pricing Tier

How do I get the details of an Error 500 for an Azure Web App?

感情迁移 提交于 2019-12-09 16:12:20
问题 I have an MVC 6 site that has been deployed as an Azure Web App. I have enabled all tracing / diagnostic options in Visual Studio using Server Explorer. I am trying to do remote debugging, but I am only seeing an Error 500 on my browser, and not finding any information (or triggering an error breakpoint) on where exactly the error occurred. I can't find any error trace on the file logs that I get from Azure. How should I troubleshoot Error 500's in an Azure Web App? Adding "CustomErrors": {

Azure Memory Resource Exhausted

白昼怎懂夜的黑 提交于 2019-12-09 14:43:58
问题 I'm currently hosting several dozen websites in Azure and recently started seeing a "Memory Resource Exhausted" warning within the portal blade for each web app: I'm hosting my sites across two S3 Standard (Large) app service plans, I'm getting the warning on all sites regardless of which app service plan they are on. Interestingly enough when looking at memory usage for either app service plan I am always below 40%, memory usage is actually rather consistent. I never see spikes or anything

GetExternalLoginInfoAsync() loginInfo return null - but only after a few hours

陌路散爱 提交于 2019-12-09 12:29:48
问题 I'm using Strava as my external login provider (I assume this is not related to Strava, could be google or facebook also) After running for a few hours / days or even weeks GetExternalLoginInfoAsync return null. I've read a bunch of other questions with the same problem, but did not find a solution. I post my entire ConfigureAuth method, just in case I did something wrong with the order. If you have a strava account you could probably experience the problem here: fartslek.no/Account/Login

ASP.NET 5 RC1: System.IO.InvalidDataException: Unexpected end of request content

大城市里の小女人 提交于 2019-12-09 12:04:46
问题 I am running an ASP.NET 5 project in an Azure Web App. When calling on an API endpoint with a file (form-data) of about 1.5mb or larger, the following exception is thrown. Here is where the exception is thrown from. Does anyone know how this can be fixed? Is there a possible workaround? System.IO.InvalidDataException: Unexpected end of request content at Microsoft.AspNet.Server.Kestrel.Http.MessageBody.ForContentLength.d__3.MoveNext() --- End of stack trace from previous location where

ASP.NET Core 2.1 Preview 2 App Not working on Azure App Service

狂风中的少年 提交于 2019-12-09 08:49:03
问题 I've been running my ASP.NET Core 2.1 Preview-1 app on Azure since this release became available. I had installed the ASP.NET Core runtime extensions through the portal and it's been working fine. Now that Microsoft released ASP.NET Core 2.1 Preview-2, I installed the upgrade to the SDK. Updated my Nuget packages so that I have the preview-2 versions of everything. See my csproj file below: I also removed the ASP.NET Core Runtime extensions from Azure App Service for my app which was showing

Azure VPN to on-premises cannot connect SQL Server from azure web app

柔情痞子 提交于 2019-12-09 03:41:24
We have setup our VPN connection in Azure to our on-premises database, the connect is working with no problems. I have written a MVC app that tries to connect to our on-premise database in SQL Server and am getting the following error: System.Data.SqlClient.SqlException (0x80131904) : 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. The connection string I am using is: name=

PDFsharp on Azure with Custom Fonts

谁说胖子不能爱 提交于 2019-12-09 03:15:31
I am using a webapp on azure to create a PDF using PDFsharp 1.32. As it is a Azure webapp I cannot install fonts. Therefore I am using the following with embedded font options: var globalFontCollection = XPrivateFontCollection.Global; _fontBytes = File.ReadAllBytes(_pathToFont); globalFontCollection.AddFont(_fontBytes, _fontName); However this does not work. There is no error just acts as if the font is not known and falls back to the default. If I install the font it works so I know the rest of the code is correct. Other code shows using AddFont with different parameters however those are not

Azure websites RoleEnvironment.IsAvailable equivalent [duplicate]

久未见 提交于 2019-12-09 00:34:31
This question already has answers here : How to check if code is running on Azure Websites (2 answers) Closed 4 years ago . I'm migrating an web app from an Azure Cloud Services Web Role to Azure Websites. Websites can't find Microsoft.WindowsAzure.ServiceRuntime and doesn't seem to like the Cloud Service helpers in general. The app uses RoleEnvironment.IsAvailable in a few places to behave differently online versus on a development computer. (We ran in development outside of the Web Role emulator for speed.) Is there an equivalent property to RoleEnvironment.IsAvailable for determining

Is it possible to configure Azure Web site SSL protocols & ciphers

人走茶凉 提交于 2019-12-08 18:46:39
问题 I want to be able to disable the TLS 1.0 protocol and the RC4 cipher on an Azure website (or Web App) and I can't figure out if it's possible or not. ( edit : I am aware that SSL 3.0 is disabled by default on Azure websites but I specifically want to disable TLS 1.0) I know what registry settings to update but the problem of course is that I don't have access to the OS. There's the NWebsec startup tasks that allow you to configure web roles (or cloud service) but my understanding is that this