C# SCOM SDK agent install works fine from debug mode but disconnects when built from installer RRS feed

  • Question

  • My team is writing a C# application that installs SCOM agents on the fly. I used the code in :


    as a template. Which works fine and will consistently install agents when I run it in debug from Visual Studio. But when I build an installer (using InstallShield), calls to:

    "AgentTaskResult results = adminServer.InstallAgents(agents, configuration);"

    always result in a Microsoft.EnterpriseManagement.Common.ServerDisconnectedException. The agent install even shows up in pending management on the SCOM server (but this sits in pending management forever and is never processed). Calling managementGroup.Reconnect(); and retrying the agent install still results in a ServerDisconnectedException. The application has no problem doing other things with the managementGroup object (from debug or running from an installer). It can create MonitorConfigurationOverrides and gets events out of an outbound connector. So it seems like the disconnect problem is localized just to agent install requests.

    I looked in the Windows Event Log and found an OpsMgr SDK Service Error: 

    An exception was thrown while processing InstallAgents for session ID uuid:71d39b19-f9a7-4d4a-82ee-5043480af635;id=41.
     Exception message: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 778.
     Full Exception: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 778.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, StringBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
       at System.Xml.XmlTextReaderImpl.ParseCharRefInline(Int32 startPos, Int32& charCount, EntityType& entityType)
       at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
       at System.Xml.XmlTextReaderImpl.ParseText()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlReader.ReadString()
       at System.Xml.XmlReader.ReadElementString(String name)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.CreateRemoteJobXml(JobDefinition jobDefinition, ManagementPackTask task, Guid hsId)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.SubmitJobs(IList`1 jobDefinitions, Guid batchId, JobCategory category)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.SubmitTasksInternal(IList`1 jobDefinitions, Guid batchId, JobCategory category, PrepareResultSet prepareTaskResultCallback)
       at Microsoft.EnterpriseManagement.ServiceDataLayer.AdministrationService.InstallAgents(Guid batchId, IList`1 jobDefinitions)
    Monday, June 9, 2014 4:21 PM

All replies

  • Hi Wylieseven,

    In my opinion, this thread is related to Operations Manager forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link. http://social.technet.microsoft.com/Forums/systemcenter/en-US/home?forum=operationsmanagerextensibility.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 10, 2014 5:53 AM