none
Silverlight and Dynamic Configuration File

    Question

  • Hi,

    I have a silverlight application, that holds few config files that include few ip address (for wcf use).

    The silverlight application is installed on various customers' servers.

    I want to set the IP addresses during the setup process (we use WIX).

    For each customer, set his relevant IP addresses which will be inserted to the xap file automatically.

    Currently, we open the xap file manully, change the config file IP addresses, re package the xap file, and copy it on the customer server. It doesn't feel usefull, because we strat getting new customers ...

    Sunday, April 08, 2012 11:19 AM

Answers

  • Hi

    According to your description, I cannot reach the solution directly.

    As far as I know, there is no good way to solve the problem because you want to unzip the xap and change something.

    And also, you can create a new C# project to zip and unzip xap file(deleting the existing one and create a new one and add it. You can get the new config files' informaiton from database).

    You can try SharpZipLib to do the zip and unzip work

    Thursday, April 12, 2012 3:51 AM

All replies

  • Hi,

    How about put the config file on a wcf service,when the customer open the silverlight app,ask for the config file.

    when the customer get the config file, save the information in the Isolated storage.

    Also, provide a default ip address list in code sounds greater.

     

    Monday, April 09, 2012 11:05 PM
  • Thanks,

    We still need an IP address to access the WCF service in order to receive the configurations...

    We have various IP addresses for our various servers accross the world.

    Any other idea?

    Thanks,

    Janiv.

    Tuesday, April 10, 2012 11:23 AM
  • Hi janiv,

    I was a little confused about your situation.

    We have various IP addresses for our various servers accross the world.

    I guess you have some servers accross the world which hosting WCF services and your customers will call one of the services.

    And you have created different config file for your silverlight application xap file which also hosted in different servers.

    And which website do the customers first access?Do they ask different website?

    Such as the Asia customers ask http://janiv/asia and the Europe customers ask http://janiv/europe.

    Why not try to put the config file or ip address in the website they first ask?

    Sorry for guessing,janiv, it would be appreciated if you can provide me more information.

    Wednesday, April 11, 2012 5:17 AM
  • Thanks,

    We do have few domains indeed.

    The web configuration files are on the relevant server, but it is under the XAP file.

    what we do today when we install/upgrade the server is:

    1. Installing the binaries on the server (including the xap)

    2. As the setup application is generic, the config files are not updated to the server they run on, so we extract the xap file

    3. Changing the web config parameters (relevant ip addresses)

    4. Compress the xap file

    We don't want this manuall process anymore. I want the setup application to ask for the configuration parameters (ip addresses) from the user and the setup application should update the silverlight configuration file.

    Or another solution...

    Thanks,

    Janiv

    Wednesday, April 11, 2012 7:05 AM
  • Hi

    According to your description, I cannot reach the solution directly.

    As far as I know, there is no good way to solve the problem because you want to unzip the xap and change something.

    And also, you can create a new C# project to zip and unzip xap file(deleting the existing one and create a new one and add it. You can get the new config files' informaiton from database).

    You can try SharpZipLib to do the zip and unzip work

    Thursday, April 12, 2012 3:51 AM
  • Is it suitable for you?

    Thursday, April 12, 2012 6:26 AM