Multiple identical DataConnections in site.xml
I've noticed in my site.xml the DataConnections list seems needlessly long. It has 20 DataConnection entries identical but for their ID values, which range from 0 to 19. The quantity seems to stem from the number DataLinks, but I could be wrong.
My question is whether this is considered inefficient in any way. Is it advisable to remove the lines with ID=1 through ID=19? I realize if I do so, I must update the references wherever they are used elsewhere. Is it worth the effort to hunt down all of those? I suspect not, but am interested in others' opinions on this.
Thanks,
Justin
0
-
Hi Justin
I would suggest that it would be best to clean it up.
I am pretty sure that there is the option to check the Data Connection on startup of the application and there is no point in wasting the users time waiting for the connections to be tested.
Regards
Ralph Price
Ralph Price0 -
I would clean these up as well. When you import a datalink from another layer or site it will just duplicate your Data Connections because it doesn't know they are already present in your site.
I will typically use a Regular Expression in Notepad++ to find and replace the Data Connections ID's in my layers and replace them with the ID I want to keep in my Site.xml file. But be careful and create a backup of your site.xml in case you mess up.
I use this regular expression online tool http://regexr.com/ to test.
DataConnectionID="([1-9]|[1-9][0-9])" This expression will find all of you DataConnection IDs ranging from 1-99. After this is done you can just delete all of the connections you got rid of.
Thanks,
Nelson Dobbs0 -
Ralph, your mention of the Check Data Connection setting spurred me to quicker action, so thank you for that tip. Nelson your regex worked like a charm, so thank you for that detail. The DataConnections tab in Manager now shows just one data connection, and the viewer loads and runs just fine. So, mission accomplished. Thanks so much! 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer