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

  • General discussion

  • 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)
    • Changed type Yan Li_ Tuesday, June 24, 2014 2:24 AM redirect
    Thursday, June 5, 2014 5:49 PM

All replies

  • Hi,

    Thank you for your question.

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thank you for your understanding and support.

    In addition, please also post in the MSDN forum for analysis.


    Yan Li

    Regards, Yan Li

    Monday, June 9, 2014 11:30 AM
  • Hi,Please post it in MSDN forum


    Best Regards,

    Vincent Wu

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, June 13, 2014 1:26 PM