I have a web role that will not start up when I deploy to Azure. Does anyone have any advice on the following windows event log...
Application: CacheDumpGenerator.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.SEHException
Stack:
at <Module>.RdGetLocalResource(UInt16*, _RD_RESOURCE**)
at <Module>._LOCALRESOURCE.GetLocalResourceW(UInt16*, _LOCALRESOURCE**)
at Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropRoleManager.GetLocalResource(System.String, Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropLocalResource ByRef)
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetLocalResource(System.String)
at Microsoft.ApplicationServer.Caching.AzureCommon.AzureUtility.GetLocalStoreDirectory()
at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.InitializeTraceProvider()
at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.get_TraceProvider()
at Microsoft.ApplicationServer.Caching.AzureCommon.AzureStartupLogger.WriteLog(System.String, System.Diagnostics.TraceEventType, System.String)
at Microsoft.ApplicationServer.Caching.CacheDumpGenerator.ProcessDump.Main(System.String[])
I've just upgraded the web role to MVC4 from MVC3 which had worked fine. The application runs fine locally. I have just upgraded Microsoft.WindowsAzure.Configuration v2.
If you can establish a remote desktop connection with the machine, then do that and, rather than just looking in the Event Viewer, open up IIS Manager and browse to your website.
For me, this will often show an ASP.NET yellow screen error identifying any required files that have not been included within your deployed Azure package. You should mark those files as "Copy Local=true" and redeploy - you may need to do this a number of times to catch all of the missing files.
Related
i have created an application, it works perfectly fine on my system but when i deploy it on azure app service. it doesn't work. it is showing such error.
An error occurred while starting the application.
.NET Core 4.6.27817.03 X86 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.2.0-rtm-35687 | Microsoft Windows 10.0.14393 | Need help?
i have tried to check the azure app service platform, but it is fine.
Also i have tried to check the publish settings on the visual studio.
Under the 'Entity framework Migrations' dropdown in publish settings i see this error:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
You misspelled a built-in dotnet command.
You intended to execute a NET Core program, but dotnet-ef does not exist.
You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Also i have checked everything, it looks fine.
I have tried to create a fresh new .net core 2.2 project and tried to deploy it but that also shows the same issues.
i want it to be deployed on azure and in working condition.
Whoever can, kindly Help.
Please look at the below answer for troubleshooting issue around dot net core 2.2
ASP.NET Core 2.2 App Service hosted on Azure returning 500 without an exception being thrown
This will give you the actual reason of the error which you can use it to resolve.
Additionally , you can enable DetailedErrorsKey in the Program.cs so you can figure it out what's happening.
For startup related exception , you can take look at this link.
The Database Error Page **middleware** captures database-related exceptions that can be resolved by using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated. This page should be enabled only in the Development environment. Enable the page by adding code to Startup.Configure:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-2.2#database-error-page
Hope it helps.
I created an ASP.Net project (.net 4.7.1), it's basically the default temple project without any change at all!
I created a build to publish it to an Azure WebApp- result : works just fine.
then I cloned the build and this time I target a virtual directory (I built the virtual directory from the portal and ticked it as an application)
surprisingly, although it has published successfully ( I doubled check from console), but when I browse it , it doesn't work and I get te below error:
HTTP Error 502.5 - Process Failure Common causes of this issue: The
application process failed to start The application process started
but then stopped The application process started but failed to listen
on the configured port Troubleshooting steps: Check the system event
log for error messages Enable logging the application process' stdout
messages Attach a debugger to the application process and inspect
it doesn't make sense to me, so I tried with different project type and .net version but the result is the same!
I found a workaround if I deploy pure HTML file (without asp.net) in the root, then the virtual directories will start working.
it looks like it's related to the fact that web.config of the virtual directory inserts something from the config of the root.
I have a hosting running windows, lets say the root domain is xxx.com. On xxx.com there should be website running on php (since IIS can run PHP, right?) or asp.net. I really dont know yet.
I am now responsible of making a asp.net mvc app, which should be running only inside a folder like xxx.com/myaspapp.
I've tried to publish the app straight to the folder via visual studio and it fails with an error:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application in IIS.
What is a solution for this? Is this scenario even possible?
Thank you.
WebDeploy can create a virtual application under an IIS site automatically. Check it out:
THE ANATOMY OF A WEBDEPLOY PACKAGE
It is simple to host an application in a sub folder. Follow the below steps.
Create a folder (myaspapp) under the root site path.
Open IIS Manager (inetmgr) and expand till the new folder.
Right the newly created folder and click on Convert to Application.
Deploy/Upload the application files directly to this folder.
Now you will be able to access the site from the sub folder.
I have an MVC v3 project I've inherited. (I'm not that familiar with web stuff.) The project runs fine in Debug mode using the Visual Studio Development Server.
However, whenever I try to run it via IIS locally, it fails with 401.0 Unauthorized. "You do not have permission to view this directory or page".
I have read pages and pages and tried many options to no avail, such as:
configured the following users to have full control of my code project folder (Everyone, IUSR, NETWORK SERVICE, ASP.NET, me, IIS_IUSRS, DefaultAppPool)
checked that I have <modules runAllManagedModulesForAllRequests="true"> in web.config
configured an Application Pool using .NET v4 / Integrated.
configured a new Site in IIS Manager using port 81 and my custom Application Pool
tried Pass-through authentication or nominating myself as a specific user.
The error occurs in IE, Chrome and FF.
Detailed Error Message
HTTP Error 401.0 - Unauthorized
You do not have permission to view this directory or page.
Module ManagedPipelineHandler
Notification ExecuteRequestHandler
Handler System.Web.Mvc.MvcHandler
Error Code 0x00000000
Requested URL http://localhost:81/
Physical Path F:\Serko\Code\Analytics\SERKO.Analytics.Web
Logon Method Anonymous
Logon User Anonymous
Environment
Windows 7 Ultimate, VS2012, IIS7.5
I do not have much hair left to pull out. Any idea why this does not run in IIS?
Environment:
Win 7x64, VS 2010 RC, Resharper 5 beta, MVC2 RC, git
When I reboot my machine, my website, configured in IIS, seems to be fine. As soon as I load VS, and try and debug from it, the site becomes completely unresponsive. I can't even get it to serve images. I have the website in IIS pointed directly to the folder with my web project in it, so that I can debug easily.
At this point, closing VS doesn't help. Neither does resetting IIS (stop/start World Wide Publishing Service). Killing the Intellitrace process doesn't help either.
The site was working ok until pretty recently. Strangely, it initially seemed to be a sporadic bug, and now it's constant.
As for what I have to go on, I have the following things being logged to the application event log. They're in this order, which means the bottom ones happened first:
.NET Runtime version 2.0.50727.4927 - Failed to CoCreate profiler.
TraceLog Profiler failed initialization, process w3wp.exe
The TraceLog Profiler in process w3wp.exe failed to get configuration from the logger. (w3wp.3xe)
Closing Visual Studio at this point yields the following two additional events:
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
DETAIL -
1 user registry handles leaked from \Registry\User\S-1-5-82-781516728-2844361489-696272565-2378874797-2530480757_Classes:
Process 7060 (\Device\HarddiskVolume2\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\TraceDebugger Tools\IntelliTrace.exe) has opened key \REGISTRY\USER\S-1-5-82-781516728-2844361489-696272565-2378874797-2530480757_CLASSES
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
DETAIL - 2 user registry handles leaked from \Registry\User\S-1-5-82-781516728-2844361489-696272565-2378874797-2530480757: Process 7060 (\Device\HarddiskVolume2\Program Files (x86)\Microsoft Visual Studio
10.0\Team Tools\TraceDebugger Tools\IntelliTrace.exe) has opened key \REGISTRY\USER\S-1-5-82-781516728-2844361489-696272565-2378874797-2530480757 Process 7060 (\Device\HarddiskVolume2\Program Files (x86)\Microsoft Visual Studio
10.0\Team Tools\TraceDebugger Tools\IntelliTrace.exe) has opened key \REGISTRY\USER\S-1-5-82-781516728-2844361489-696272565-2378874797-2530480757\Control Panel\International
I've removed everything from the tag in my web.config. I'm out of ideas. Any suggestions?
Have you tried doing a repair on your IIS, .NET Framework, or VS2010 installs?