Azure Cloud Service web role web pages not loading

Most likely, this will be a very long message to try to fully explain how my Azure Cloud Service is being deployed, and that I have already tried to solve this problem, so we apologize and thank you in advance.

Framework: 4.5.1
Azure SDK: 2.5
Visual Studio: upgrade to 2013

Problem:

After publishing the Azure Cloud Service, when I try to load a web page, the browser will load continuously, never displaying the page or any error (network error code or .Net error). This is the same behavior if I try to load a website after being redirected to a virtual machine in Azure itself, from an external IP address or from -cloudservicename-.cloudapp.net. This applies to both release configuration and debugging when deployed to Azure.

However, the application works and works absolutely normal in debug and release modes when running locally on Azure Emulator. There are no differences between my cloud and on-premises .cscfg files prohibiting the NetworkConfiguration section for VPN configuration.

The cloud service deploys from Visual Studio without errors, and I can use RDP on virtual machines and open IIS, etc., without problems, while the configuration of the website and certificates look fine.

My application

My Azure Cloud Service consists of two roles: the web role that hosts the website, and the worker role, which performs various background tasks.

This project will last some time, and I published several iterations to Azure in the past from different computers. This is my first publication from the new Windows 8.1 laptop, although this should not change. The configuration has changed very little since the previous release (one connection string was added to the role). The only thing that has changed is that I upgraded to version VS2013 4 (from update 3) and Azure SDK 2.5 (from 2.4).

I can publish the configuration files if necessary, but everything seems to be in order, given that the deployment really works.

Study:

I have taken many steps to try to research and solve the problem.

The RDP server on the server does not detect any problems, there are no IIS entries in the event log, and my own log does not have anything useful in it (more on this later).

I also enabled Azure Diagnostics, but looking at the returned logs, nothing jumps at me like a problem log.

The next thing I tried is attaching the remote debugger to the Azure VM, this works, and I can debug the project. I set breakpoints on all the methods that I process in Global.asax.vb, including:

Application_BeginRequest Application_AuthenticateRequest Application_Error 

When the page is requested, Application_BeginRequest will be deleted, and then Application_AuthenticateRequest , as expected. however, following the code through Application_AuthenticateRequest leads to some weird behavior.

In this code, I check a FormsAuthenticationCookie , which, if it turns out, installs HttpContext.Current.User and Thread.CurrentPrincipal . In this case, the cookie does not mean anything, because the user has not logged in, that is, the Application_AuthenticateRequest method ends. At this point, I can continue to work with the .Net framework code and see the successful completion of the HttpApplication.ExecuteStep .

At this point, I expected that either the master_Page_PreLoad method or one of the other preload events in MasterPage or my custom Page implementation would be executed for execution, but none of them hit.

After the debugging process is completed, Application_Error is ultimately deleted in a few minutes, which means that my log is writing an exception, which apparently caused an error. This rarely happens, but when this happens, I see two different errors:


First error in my logging:

ErrorCode: SubStatus: A temporary error exists. Please try again later. (One or more of the indicated cache servers is unavailable, which may be caused by a busy network or servers. For cluster clusters in place, also check the following conditions. Make sure that this account has permission for account security and that the AppFabric cache service is enabled through Firewall on all nodes of the cache. Also MaxBufferSize on the server must be greater than or equal to the size of the serialized object sent from the client.). Additional information: the client tried to communicate with the server: net.tcp: //rolename.here: 24233 .. GUID: 9f85d178-968f-4908-bec4-d1a5f57bb819

in Microsoft.ApplicationServer.Caching.DataCache.ThrowException (ErrStatus errStatus, Guid trackingId, Exception responseException, Byte [] [] payload, endpoint endpoint) in Microsoft.ApplicationServer.Caching.DataCacheFactory.EstablishConnection (IEnumerable'1 servers RequestBody, Func'3 sendMessageDelegate, DataCacheReadyRetryPolicy retryPolicy) with Microsoft.ApplicationServer.Caching.SocketClientProtocol.Initialize (IEnumerable'1 servers) Microsoft.ApplicationServer.Caching.DataCateFecameleeecleeclelegate DistributedCache.CacheHelpers.RunCacheCreationHooks (CacheConnectingEventArgs fetchingEventArgs, IDataCacheFactoryCacheFactory data, object sender, EventHandler'1 fetchingHandler, EventHandler'1 fetchedHandler) at Microsoft .Web.DistributedCache.DistributedCacheOutputCacheProvider.CreateInternalProvider (IHttpRuntime httpRuntime, OutputCacheInitializationData initData, IDataCacheFactory dataCacheFactory, EventHandler'1 cacheFetching, EventHandler'1 cacheFetched) in Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider.GetInternalProvider () in Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider.Get (String key) in System.Web.Caching.OutputCache.Get (String key) in System.Web.Caching.OutputCacheModule.OnEnter (object source, EventArgs eventArgs) in System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication. IExecutionStep.Execute () on System.Web.HttpApplication.ExecuteStep (step IExecutionStep, Logical & completedSynchronously)

Having studied this error on the line, I found a Microsoft source (sorry I no longer have the link), basically saying: "It is assumed that this happens sometimes, do not worry about it," however this is not so. I have not seen this error before in my development work, but one of the other developers working on the project has experienced this in debugging recently. Has anyone experienced this, or knows for sure that we do not need to worry about it?

In an attempt to resolve this, I deployed the service with caching disabled in a role on the Internet, but it did not matter.

Here is my cache configuration in web.config.

  <!--To use the in-role flavor of Windows Azure Cache, set identifier to be the cache cluster role name --> <!--To use the Windows Azure Cache Service, set identifier to be the endpoint of the cache cluster --> <autoDiscover isEnabled="true" identifier="rolename.here" /> <!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />--> <!--Use this section to specify security settings for connecting to your cache. This section is not required if your cache is hosted on a role that is a part of your cloud service. --> <!--<securityProperties mode="Message" sslEnabled="true"> <messageSecurity authorizationInfo="[Authentication Key]" /> </securityProperties>--> </dataCacheClient> 


The second error that is recorded in my protocol:

System.Web.HttpException (0x80004005): the server cannot add a header after sending HTTP headers. in System.Web.HttpResponse.AppendHeader (row name, row value) in System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () on System.Web.HttpApplication.ExecuteStep (Logical step completed )

This seems like a side effect, not the cause of the problem, but any comments are welcome.


Other things I've tried:

  • Created a customized new cloud service in Azure - the same result.
  • I added a new Azure Cloud Service project to the solution and configured it from scratch - the same result.

At this moment, I completely lost my attitude to what I should do, I can’t understand why it works fine in debugging, but not in deployment, and why there is no log that shed more light on the problem - at the moment I’m not even sure what to look for to find people who have had a similar problem.

The last question it all boils down to is, why are my pages not loading?

I will load my old Windows 7 box for deployment from there and see if there is a difference.

Please feel free to ask if you need more information.

Thanks for reading this and for any help you can give.

+2
source share
1 answer

Verify that the caching library version matches the SDK version. You will get this error if there is a version mismatch.

+5
source

Source: https://habr.com/ru/post/1242104/


All Articles