AmtSystem.Connect() forcibly closed on production system Win 2k3
I have some troubles with the AmtSystem.Connect() function on my production system Win 2k3. I get an exception of a different Socket function in the application. The AmtSystem.Connect() function forcibly closed the my application which is running as a service. This happens on my production system only. It works fine on my developer machine with Win 2k3.
I have deployed my C# application, CIMFramework.dll, CIMFrameworkUntyped.dll, DotNetWSManClient.dll, IWSManClient.dll, Manageability Stack.dll, imrsdk.dll, HeciWrapper.dll and StorageWrapper.dll.
NOTE: I get an error in the MSI builder that imrsdk.dll, HeciWrapper.dll and StorageWrapper.dll could not be resolved by dependency scanner altough I have put the DLLs into the release folder.
Which DLLs or Framework do I need to get the AmtSystem.Connect() error solved? Or is it related to another issue?
Without reviewing your code/project, it would seem that you do indeed have all the reference files required to run the service. However, it sounds like you are running into an issue with trying to use the AmtSystem class (presumably from the Manageability Developer Tool Kit) within a Windows Service. The Windows operating system requires that services start within 30 seconds (if I recall correctly), and the AmtSystem.Connect method can take much longer than this because it attempts to "intelligently" determine the connection methods (non-TLS, TLS, mutual TLS). If this is the cause of your issue, then you should create a background thread in your service's Start method that would establish the connection to the target AMT system.
Again, if you are using the reference code provided by the Manageability Developer Tool Kit, then I would recommend reviewing the source code to the Manageability Outpost Tool Service project as this provides an example of how to use the AmtSystem class within a Windows service (although it does so on the local AMT system).