locked
Project 2010 Addin - not able to read the value of Key from config file of Addin RRS feed

  • Question

  • Hi,

    We have created an project 2010 addin in our project, it contians few ribbons according to client requirement. On click of these ribbons we are calling  the WCF service url and database name from configuration file as below

    <

    appSettings

    >

    <

    add key="PWAURL" value="http://GDFN-IPL-06/pwa/"

    />

    <

    add key="IPLServicesPort" value="82"

    />

    <

    add key="RelativeWeatherConflicServiceUrl" value="IPLWeatherIntegrationServices/WeatherService.svc"

    />

    <

    add key="RelativeOptimizationServiceUrl" value="IPLOptimizationService/IPLOptimizationWebservice.svc"

    />

    <

    add key="RelativeBaselineServiceUrl" value="GDFSuez.IPLBaselineServices/IPLBaselineServices.svc"

    />

    <

    add key="RelativeApprovalHistoryServiceUrl" value="IPLProjectApprovalHistoryService/IPLProjectApprovalHistoryService.svc"

    />

    <

    add key="ConsequenceHelpUrl" value="Project%20Detail%20Pages/ConsequenceHelp.aspx"

    />

    <

    add key="RiskProbabilityHelpUrl" value="Project%20Detail%20Pages/RiskProbabilityHelp.aspx"

    />

    <

    add key="UrgencyHelpUrl" value="Project%20Detail%20Pages/UrgencyHelp.aspx"

    />

    <

    add key="NetworkUserName" value="IPL_Content"

    />

    <

    add key="NetworkPassword" value="JasZtTHv"

    />

    <

    add key="NetworkDomain" value="gdfn"

    />

    <

    add key="ClientSettingsProvider.ServiceUri" value=""

    />

    <

    add key="gdfn-ipl-01_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-06_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-14_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-16_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=GDF_IPL_DB;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-01_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-06_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-14_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-16_DraftProjectServer_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=ProjectServer_Draft;Integrated Security=True"

    />

     

    <

    add key="gdfn-ipl-01_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=ProjectServer_Published;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-06_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Published;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-14_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=ProjectServer_Published;Integrated Security=True"

    />

    <

    add key="gdfn-ipl-16_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=ProjectServer_Published;Integrated Security=True"

    />

     

     

     

    </

    appSettings>

    There is no issue in reading the key values in development server and the same addin is installed in test server we are facing the above issue.

    Do anyone have idea on this?

    Thanks in advance.

    Sunitha

     
    • Moved by Alexander.Burton Friday, November 4, 2011 10:27 AM Programming question (From:Project Server General Questions and Answers)
    Friday, November 4, 2011 10:10 AM

Answers

  • Cool, Please mark the post as an answer to help other users.
    Ravishankar Polepalli MCP
    Microsoft Dynamics and Office SharePoint Server Consultant
    ravi.polepalli@gmail.com
    • Marked as answer by Sunitha vv Monday, November 14, 2011 10:42 AM
    Monday, November 14, 2011 10:38 AM

All replies

  • Hi,

    Moving this over to the customisation forum. Not sure if there is much we can assist with without seeing your bespoke source code. The app settings themselves doesn't give us much to work with :(

     

     


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Friday, November 4, 2011 10:27 AM
  • Hi,

    We have created an project 2010 addin in our project, it contians few ribbons according to client requirement. On click of these ribbons we are calling  the WCF service url and database name from configuration file as below

    <appSettings >

    <add key="PWAURL" value="http://GDFN-IPL-06/pwa/" />

    <add key="IPLServicesPort" value="82" />

    <add key="RelativeWeatherConflicServiceUrl" value="IPLWeatherIntegrationServices/WeatherService.svc" />

    <add key="RelativeOptimizationServiceUrl" value="IPLOptimizationService/IPLOptimizationWebservice.svc" />

    <add key="RelativeBaselineServiceUrl" value="GDFSuez.IPLBaselineServices/IPLBaselineServices.svc" />

    <add key="RelativeApprovalHistoryServiceUrl" value="IPLProjectApprovalHistoryService/IPLProjectApprovalHistoryService.svc" />

    <add key="ConsequenceHelpUrl" value="Project%20Detail%20Pages/ConsequenceHelp.aspx" />

    <add key="RiskProbabilityHelpUrl" value="Project%20Detail%20Pages/RiskProbabilityHelp.aspx" />

    <add key="UrgencyHelpUrl" value="Project%20Detail%20Pages/UrgencyHelp.aspx" />

    <add key="NetworkUserName" value="IPL_Content" />

    <add key="NetworkPassword" value="JasZtTHv" />

    <add key="NetworkDomain" value="gdfn" />

    <add key="ClientSettingsProvider.ServiceUri" value="" />

    <add key="gdfn-ipl-01_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True" />

    <add key="gdfn-ipl-06_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True" />

    <add key="gdfn-ipl-14_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=GDF_IPL_DB;Integrated Security=True" />

    <add key="gdfn-ipl-16_GDF_IPL_DB_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=GDF_IPL_DB;Integrated Security=True" />

    <add key="gdfn-ipl-01_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True" />

    <add key="gdfn-ipl-06_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True" />

    <add key="gdfn-ipl-14_DraftProjectServer_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=ProjectServer_Draft;Integrated Security=True" />

    <add key="gdfn-ipl-16_DraftProjectServer_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=ProjectServer_Draft;Integrated Security=True" />

     <add key="gdfn-ipl-01_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-01\G431128;Initial Catalog=ProjectServer_Published;Integrated Security=True" />

    <add key="gdfn-ipl-06_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-06\H431128;Initial Catalog=ProjectServer_Published;Integrated Security=True" />

    <add key="gdfn-ipl-14_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-SQL-02\I431128;Initial Catalog=ProjectServer_Published;Integrated Security=True" />

    <add key="gdfn-ipl-16_PublishedProjectServer_ConnectionString" value="Data Source=GDFN-IPL-17;Initial Catalog=ProjectServer_Published;Integrated Security=True" />

    </appSettings>

    There is no issue in reading the key values in development server and the same addin is installed in test server we are facing the above issue.

    Do anyone have idea on this?

    Thanks in advance.

    Sunitha

     

    • Merged by Alexander.Burton Friday, November 4, 2011 9:56 PM Same question, please only post once.
    Friday, November 4, 2011 11:11 AM
  • Hi,

    Write a message box in your code and get the config path it is refering to using

    ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None).FilePath

    Based on the value it gives, move the config settings there..

     


    Ravishankar Polepalli MCP
    Microsoft Dynamics and Office SharePoint Server Consultant
    ravi.polepalli@gmail.com
    Sunday, November 13, 2011 3:44 PM
  • Hi,

    Thanks for the information.

    I used the above solution and found that the config file of addin point's is different from the actual config file

    i have install our project addin which should point to the path C:\Program Files\Microsoft\GDF IPL Project2010AddinSetup\IPLProject2010addin.dll this is the actual config file it has to read the values froms, but now its pointing to  C:\Program Files\Microsoft Office\Office14\WINPROJ.exe.config because of which the service url and database name are not there in the configuration file and we are getting error message as"Unable to find the configuration value for server <servername>".

    Could please let me know is there any way to change the configuration path for addin or any other soultion?

    Thanks in advance.

    Sunitha

    Monday, November 14, 2011 9:46 AM
  • You can do one thing,

    you can just add a reference to the addin config file into the default project 2010 config file

    C:\Program Files\Microsoft Office\Office14\WINPROJ.exe.config

    That should resolve the problem without copying all the settings.


    Ravishankar Polepalli MCP
    Microsoft Dynamics and Office SharePoint Server Consultant
    ravi.polepalli@gmail.com
    Monday, November 14, 2011 9:51 AM
  • I dont see any file by name "WINPROJ.exe.config" in  C:\Program Files\Microsoft Office\Office14  folder. there is an file WINPROJ.exe application(when double clicked on it the application opens in project server) in C:\Program Files\Microsoft Office\Office14  directory. how can i get "WINPROJ.exe.config" file to add the addin config into the default project 2010 config file.

    Thanks in advance

    Sunitha

    Monday, November 14, 2011 10:04 AM
  • Add a new file with the same name in that folder with the following content <?xml version="1.0"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Microsoft.Office.Project.Server.Library" publicKeyToken="71e9bce111e9429c" culture="neutral" /> <bindingRedirect oldVersion="12.0.0.0" newVersion="14.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> you can refer to the below link for more information http://social.msdn.microsoft.com/Forums/en-US/tfsprojectsrvint/thread/d775e753-605c-4475-a454-63e5f342b8ca/
    Ravishankar Polepalli MCP
    Microsoft Dynamics and Office SharePoint Server Consultant
    ravi.polepalli@gmail.com
    Monday, November 14, 2011 10:17 AM
  • Thanks Ravi. For your help to resolve this issue :) Sunitha
    Monday, November 14, 2011 10:36 AM
  • Cool, Please mark the post as an answer to help other users.
    Ravishankar Polepalli MCP
    Microsoft Dynamics and Office SharePoint Server Consultant
    ravi.polepalli@gmail.com
    • Marked as answer by Sunitha vv Monday, November 14, 2011 10:42 AM
    Monday, November 14, 2011 10:38 AM