Application '/LM/W3SVC/1/ROOT/' with physical root '' failed to load clr and managed application - asp.net-core

My Web API runs OK most of the time in IIS v.10 on Windows Server 2016. However, an error occurs from time to time and I can't figure out the error source or cause. The corresponding Windows Logs/Application error log record is as follows
Application '/LM/W3SVC/1/ROOT/MyWebAPI' with physical root '....\MyWebAPI\' failed to load clr and managed application.
Managed server didn't initialize after 120000 ms.
Process Id: 4840.
File Version: 12.2.19169.6. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: e7f262e33108e92fc8805b925cc04b07d254118b
The error results in HTTP Error 500.30 - ANCM In-Process Start Failure on the client side. After that, MyWebAPI stops working and I have to recycle MyWebAPI application pool manually.
Can anybody help, please?

ACM 500.30 means something wrong with the startup.
for more info -> https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#50030-in-process-startup-failure
If you are using 3rd party services like KeyVault etc then surround them with try-catch and log error in the logger.
you can use event viewer for debugging.
https://www.happycoder.gr/blog/aspnet-core-20-event-viewer-application-logging/

I got the same error when I published my .net core 3.1 project.
You can get this error if your server is win-x64 and you published to win-x86. If this is the case, you must change the target runtime to win-x64.

Related

UMBRACO 10 HTTP Error 500.30 - ASP.NET Core app failed to start

I am trying to deploy my Website with umbraco 10, I always get the following error:
HTTP Error 500.30 - ASP.NET Core app failed to start
The website works correctly locally, however when deploying the app I get the same error...
Details:
DB SQL Server
Azure WebApp .Net6
What i have tried
I have followed the instructions: https://our.umbraco.com/documentation/Fundamentals/Setup/Server-Setup/azure-web-apps
I have created a project from scratch, thinking that the problem was some package, but still the same error.
This is how my umbraco 10 application looks once deployed from VS to an appservice (Azure)
The first thing I would do is check the logs on the the environment where you have deployed the code. That should give you a better idea what is actually going wrong as the error you are getting is very generic and not that helpful.
I have seen issues where the media folder is missing and that is something to check.
When I have issues in Azure, I also look at the files via the Azure Portal and check the connection string and any other configurations files to ensure they look correct. It could be the deployment has screwed up some values.
Have a look at this post which may provide some further details - https://our.umbraco.com/forum/using-umbraco-and-getting-started/108288-getting-http-error-50030-after-successful-publishing-to-azure

ASP.Net Core Web API in IIS

I'm trying to add an API to IIS. The API (via Swagger) runs fine locally. To rule out anything in my API I built the basic Weather API one and I get the same error.
App Log:
Application '/LM/W3SVC/1/ROOT/WeatherAPI' with physical root 'C:\inetpub\wwwroot\Weather' failed to load coreclr. Exception message:
CLR worker thread exited prematurely
Application '/LM/W3SVC/1/ROOT/WeatherAPI' with physical root 'C:\inetpub\wwwroot\Weather' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.
Error 0xe0434352 is so generic as to be of no use.
I see others have had similar issues (some of which are on StackOverflow) but none resolve the issue.
It's being published as: Release/.Net 6.0/Self-Contained/win-x64.
The AppPool is "No Managed Code"/Integrated Pipedline.

issue running app on IIS server, keep getting app failed to start

IIS 10 ASP.NET Core app failed to start
Getting error HTTP Error 500.30 - ASP.NET Core app failed to start when i launch the web app. In event viewer i have:
Application '/LM/W3SVC/3/ROOT' with physical root 'C:\inetpub\wwwroot\MarCRM_Pro' has exited from Program.Main with exit code = '1'. Please check the stderr logs for more information.
and
Application '/LM/W3SVC/3/ROOT' with physical root 'C:\inetpub\wwwroot\MarCRM_Pro' failed to load coreclr. Exception message:
CLR worker thread exited prematurely
The app on Visual Studio 2019 works when i run it then i publish it to a folder and copy that to the IIS server.
hopefully i can find some answer soon, i have been trying different things found by googling but so far no luck.
I was able to find a fix to this by changing in web.config file.
In the web.config file had to change the hostingModel="OutOfProcess" from "InProcess"
Post where i was able to find this fix.
.NET Core 3.0 and IIS: HTTP Error 500.30 - ANCM In-Process Start Failure: failed to load coreclr
Thanks for your input guys.

Integrated app pool and virtual directories

I have MVC application that uses integrated app pool.
Under this MVC application, i have created a virtual directory that points to our file server location. This file server has some pdfs and custom images.
When we try to access the resources via virtual directory, I get the following 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: An error occurred loading a configuration file: Failed to start monitoring changes to '\\nas2\CardDeck\web.config'.
Source Error:
[No relevant source lines]
Source File: \\nas2\CardDeck\web.config Line: 0
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
When I change the app pool to classic, i can access these resources just fine. What am i missing here?
Thanks
App pool was running under "NetworkService" identity.
I have changed it to a user account that has admin permissions on the box.
The thing that i still need to figure out is, why these were working under classic app pool and network service as the identity?

Weblogic 10 Managed servers running, but I get a 404 error

I have migrated an application from WL 8 to WL 10 and set up my managed servers. They indicate that they are running, but when I try to access the site it throws a 404. This is my first time deploying anything on 10 so I could be missing something. Any ideas? Please let me know what additional information could be helpful. edit: I had this working, added a db connection and now it fails.
Here is my error:
weblogic.management.DeploymentException: Exception occured while downloading files
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:43)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56)
at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:98)
at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:670)
at weblogic.deploy.internal.targetserver.BasicDeployment.stageFilesForStatic(BasicDeployment.java:713)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:100)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:187)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "[DeploymentService:290065]Deployment service servlet encountered an Exception while handling the deployment datatransfer message for request id "0" from server "TEST01". Exception is: "weblogic.management.configuration.JDBCSystemResourceMBeanImpl"."
at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:86)
at weblogic.deploy.service.datatransferhandlers.DataHandlerManager$RemoteDataTransferHandler.getDataAsStream(DataHandlerManager.java:153)
at weblogic.deploy.internal.targetserver.datamanagement.AppDataUpdate.doDownload(AppDataUpdate.java:39)
at weblogic.deploy.internal.targetserver.datamanagement.DataUpdate.download(DataUpdate.java:56)
at weblogic.deploy.internal.targetserver.datamanagement.Data.prepareDataUpdate(Data.java:98)
at weblogic.deploy.internal.targetserver.BasicDeployment.prepareDataUpdate(BasicDeployment.java:670)
at weblogic.deploy.internal.targetserver.BasicDeployment.stageFilesForStatic(BasicDeployment.java:713)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:100)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:187)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
You got a weblogic.management.DeploymentException and this means that something went wrong in some server even if everything seems OK from the console.
Underlying error is from weblogic.management.configuration.JDBCSystemResourceMBeanImpl so I would review datasource config is appropiate for every target in your environment. Also check that datasource targets are the same as web application targets and JDBC drivers are available at managed servers classpath as well.
Try to log to the WebLogic Admin console and see what is the status of your application.
You can use the 'Testing' tab of your deployment to see the URL that the application has been deployed to. This will assist you in the troubleshooting process.
If you don't see anything here to test there are a few possible reasons, including the following:
The application failed to deploy and/or is not 'Active'
You are using a cluster and no managed servers are running
You have managed servers running but they are not in a 'RUNNING' state