Forum Discussion

Suhas's avatar
Suhas
Creator III
6 years ago
Solved

how to access a variable from the InnovatorServerConfig.xml file inside a c# method.

I need to get the value of ReportServer from the below configuration :


<ReportingServices>
<ReportServer>localhost/.../ReportServer>
<User>XXX</User>
<Password>XXX</Password>
</ReportingServices>

  • From my POV this one is one of the best customizations you can do cause it´s helps improving security. I once got this tip from another community member:

    XmlDocument xml = CCO.Cache.GetCacheInfo("ApplicationXML");
    string reportServerURL = xml.SelectSingleNode("//ReportingServices/ReportServer").InnerText;
    string reportUser = xml.SelectSingleNode("//ReportingServices/User").InnerText;

    ...

2 Replies

  • From my POV this one is one of the best customizations you can do cause it´s helps improving security. I once got this tip from another community member:

    XmlDocument xml = CCO.Cache.GetCacheInfo("ApplicationXML");
    string reportServerURL = xml.SelectSingleNode("//ReportingServices/ReportServer").InnerText;
    string reportUser = xml.SelectSingleNode("//ReportingServices/User").InnerText;

    ...

    • Suhas's avatar
      Suhas
      Creator III

      Thanks Angelalp for your quick response.

      It is working fine.