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.
I'm relatively new to SQLServer2017 Developer and System Center Operations Manager however I was asked to set up a SCOM test environment for our network. However, I keep receiving this error about one of my SCOM service accounts. I have already looked at some fixes and applied them however after refreshing the log the same error message still keeps appearing.
2020-02-13 14:03:09.05 spid47s An exception occurred while enqueueing a message in the target queue. Error: 15404, State: 19. Could not obtain information about Windows NT group/user 'OMDASTest', error code 0x5.
We are using SiebelDataBean to connect to Siebel EAIObjMgrAPI component using below process provided.
https://docs.oracle.com/cd/E14004_01/books/OIRef/Customizing_Siebel_Object_Interfaces12.html
The application works fine for a while and then start throwing below error, kindly let me know if anyone else has encountered this issue.
[CMGR WARNING] Received notification: The task 257950792 has either been shutdown or timed-out connection:f600448
Logon Request 106 on connection 2100445 was abandoned after 30001 ms because it timed out.(SBL-JCA-00317)
Check the SISNAPI idle timeout setting on the EAI component parameters. If there is no activity for that much seconds, the system logs out the session to preserve memory.
I have a self-hosted WCF service (runs inside a windows service). This service listens for messages on an MSMQ. The service is PerCall, and Transactional running on Windows 2008 R2, .NET 4.0, MSMQ 5.0.
Once every couple of weeks the service will stop processing messages. The windows service remains running but the WCF servicehost itself stops. The servicehost faults with the following exception:
Timestamp: 3/21/2015 5:37:06 PM Message: HandlingInstanceID:
a26ffd8b-d3b4-4b89-9055-4c376d586268 An exception of type
'System.ServiceModel.MsmqException' occurred and was caught.
--------------------------------------------------------------------------------- 03/21/2015 13:37:06 Type : System.ServiceModel.MsmqException,
System.ServiceModel, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 Message : An error occurred while
receiving a message from the queue: The transaction's operation
sequence is incorrect. (-1072824239, 0xc00e0051). Ensure that MSMQ is
installed and running. Make sure the queue is available to receive
from. Source : System.ServiceModel Help link : ErrorCode :
-1072824239 Data : System.Collections.ListDictionaryInternal TargetSite : Boolean TryReceive(System.TimeSpan,
System.ServiceModel.Channels.Message ByRef) dynatrace_invocationCount
: 0 Stack Trace : at
System.ServiceModel.Channels.MsmqInputChannelBase.TryReceive(TimeSpan
timeout, Message& message) at
System.ServiceModel.Dispatcher.InputChannelBinder.TryReceive(TimeSpan
timeout, RequestContext& requestContext) at
System.ServiceModel.Dispatcher.ErrorHandlingReceiver.TryReceive(TimeSpan
timeout, RequestContext& requestContext)
Searching for the particular exception ("The transaction's operation sequence is incorrect") doesn't yield a lot of info. And most suggestions for how to remedy a faulted services is to restart the servicehost within the faulted event.
I can do that but I hoping that there is a known fixable cause for this exception and/or whether there is a cleaner way to handle it.
We have faced this issue in our product and we opened a ticket with Microsoft, at the end they admits its a bug in .NET Framework and it will be fixed soon.
The issue was reported on windows server 2008 and 2012 but never on 2016 or windows 10.
So we did two solution, recommended all customers to upgrade to Windows 2016, and we added a code to handle the on fault for the service host to restart the service (You can simulate the same error by restarting the MSMQ service while the WCF service host is open.
The code to restore the service is as below:
first you add an event handler for your host to handle "Faulted" event:
SH.Faulted += new EventHandler(SH_Faulted);
//SH is the ServiceHost
Then inside the event handler
private static void SH_Faulted(object sender, EventArgs e)
{
if (SH.State != CommunicationState.Opened)
{
int intSleep = 15 * 1000;
//Abort the host
SH.Abort();
//Remove the event
SH.Faulted -= new EventHandler(SH_Faulted);
//I sleep to make sure that the MSMQ have enough time to recover, better make it optional.
System.Threading.Thread.Sleep(intSleep);
try
{
ReConnectCounter++;
LogEvent(string.Format("Service '{0}' faulted restarting service count # {1}", serviceName, ReConnectCounter));
//Restart the service again here
}
catch (Exception ex)
{
//failed.. .you can retry if you like
}
}
}
Eventually the error will happen again, but your service will continue working fine, till Microsoft solves the issue or you upgrade to 2016
Updated:
After further investigation, and help from Microsoft we found the root cause of the issue, which is the order of the timeout between the below:
MachineLeveDTCTimeOut(20 minutes) >=
DefaultTimeOut(15 minutes) >=
WCF service transactionTimeout >
receiveTimeout()
So by adding the below it should fix this issue:
<system.transactions>
<defaultSettings timeout="00:05:00"/>
</system.transactions>
More detailed article:
https://blogs.msdn.microsoft.com/asiatech/2013/02/18/wcfmsmq-intermittent-mq_error_transaction_sequence-error/
We have the same problem in our production environment. Unfortunately, there is an issue opened with Microsoft about it, but it's marked "Closed as Deferred" since 2013. The following workaround is mentioned by EasySR20:
If you set the service's receiveTimeout a few seconds less than the
service's transactionTimeout this will prevent the exception from
happening and taking down the service host. These are both settings
that can be set in the server's app.config file.
I haven't confirmed this resolves the issue, but it's one option.
We have implemented the service fault restart option instead.
This is about using Trace in multi threaded web app
I am attempting to use tracing in a new thread started with
ThreadPool.QueueUserWorkItem(AddressOf WorkMethod, autoEvent)
My code works without crashing until I add
Trace.warn(message,category)
to a function called within the new thread
The error is below, the crash usually stops the application pool, so the page fails to load and the error message must be extracted from the IIS event log
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/5/ROOT
Process ID: 2576
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace: at System.Web.UI.Page.get_Trace()