Migration Issues
-
Thursday, June 21, 2012 10:10 AM
Hi;
I have upgraded to v5 of the Config Services libraries. I already had hosts configured and integrated into my project and working properly. After I migrated to v5 of config services my host will no longer start up. I am getting an error stating that CONFIGDB_SQL_CONN_STRING cannot be found when the following line is executed:
ConfigUtility.reflectSetField(_settingsInstance, null, "CONFIGDB_SQL_CONN_STRING", new object[] { ConfigDBConnString });
Should I be able to use my original Host Configs? Do They need to be regenerated? Is there DB modifications since V2.04)? If so is there a means to migrate my DB tables to the newer ones?
All Replies
-
Monday, July 02, 2012 7:09 PMModerator
Hi Peter,
Migration is less than ideal, (see my other post). Best bet is to use the new VS Config Service Wizard per https://azureconfigweb.cloudapp.net/Develop.aspx (first link); which creates new blank repositories, startup logic, and web/app.config files. Then migrate your code into this solution, or vice/versa. The Wizard will create a working app with the correct generated code for 5.0, and correct web/app./config file formats. Your new "blank" repositories in 5.0 format will need to be re-populated using ConfigWeb; or via data transfer from old 2.x databases to new 5.0 databases/tables.
-Greg
Greg Leake, Microsoft
-
Tuesday, July 10, 2012 5:08 PM
Hi;
Well I had gone through an evaluation and run through of the config services code and was able to get things working again without having to regenerate. What I had found was the following:
- new field in ConnectedServices
ConnectedServices - SecurityMode varchar(100) - two new fields in web.config for configweb app
<add key="CONFIG_NAME12" value=""/>
<add key="CONFIG_CLIENT12" value=""/> - ServiceHosts
HostName -- cannot use supplied host name -- seems to only work with generated host name - Service initialize -- startup in secondary thread? -- access to config settings needs time
I had found this out after I was wondering why a config key I had registered was no longer being picked up. From what I can tell the Configuration Keys (which I assume get loaded when the host is registered) are being loaded via an asynchrounous operation. I have threads that I start up right after I initiate the config host and the key I was looking for was previously being found. When I moved to the new config services the key was no longer being found. I found that if I put a sleep op after the config host is initiated and when the threads that use it request it is was there (which led me to believe the config host loaded the config keys asynchrounously). Anyway if you run into something like this then check when you are accessing the keys.
These were the only modifications required code wise. I did have to delete the connections within ConfigWeb because the services that were pointing at each other were no longer being seen. And when I tried to update I was getting run time errors (tracing through code it looked like config settings were not being found). After I re configured my hosts within ConfigWeb all is working again.
Peter
- Marked As Answer by Peter Simard Tuesday, July 10, 2012 5:09 PM
- new field in ConnectedServices

