G
The problematic code runs perfectly fine and unmodified when the
application is executed as a standalone .exe. However when the same
code is executed inside Windows Service - it locks up and waits
indefinetely attempting to instantiate COM object with
Activator.CreateInstance.
The service impersonates local admin creadentials.
I am not getting any exceptions, neither raised, nor reported in
systems logs.
Code:
------------------------------------------------------------
Dim oCOMype As Type = Type.GetTypeFromProgID(sProgId)
Log.LogMessage(String.Format("Retrieved type: {0}", sProgId))
Dim oCOMObject As Object = Activator.CreateInstance(oCOMType) '''
<---- will sit on this line indefinetely
Log.LogMessage(String.Format("Instantiated type: {0}",
oCOMType.ToString))
----------------------------------------------------------
Worst part - there are no exception or hints of any kind. What could
this be attributed to? How do i get closer to a solution? I've tried
to set the enclosing thread to STA threading, doesn't help.
application is executed as a standalone .exe. However when the same
code is executed inside Windows Service - it locks up and waits
indefinetely attempting to instantiate COM object with
Activator.CreateInstance.
The service impersonates local admin creadentials.
I am not getting any exceptions, neither raised, nor reported in
systems logs.
Code:
------------------------------------------------------------
Dim oCOMype As Type = Type.GetTypeFromProgID(sProgId)
Log.LogMessage(String.Format("Retrieved type: {0}", sProgId))
Dim oCOMObject As Object = Activator.CreateInstance(oCOMType) '''
<---- will sit on this line indefinetely
Log.LogMessage(String.Format("Instantiated type: {0}",
oCOMType.ToString))
----------------------------------------------------------
Worst part - there are no exception or hints of any kind. What could
this be attributed to? How do i get closer to a solution? I've tried
to set the enclosing thread to STA threading, doesn't help.