I find using a relative Xpath such as 
"//configuration/connectionStrings/add[\[]@name='MYNAME'[\]]" is more reliable. 
 Also, I wouldn't recommend using "XSLPattern" as the selection language.  I 
much prefer "XPath".  My understanding is that "XSLPattern" is effectively 
deprecated anyway.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.(r)
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com 



-----Original Message-----
From: Hans ter Horst [mailto:hoshis...@gmail.com] 
Sent: Monday, May 28, 2012 9:12 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Web.config connection string: Failed to find node (Wix 3.5)

Hello, I have googled left and right and cannot find why I get a "Failed to 
find node" error on this piece of code:

<Component Id="AddConnectionString"
Guid="{CF219EFA-063D-4575-BDCB-9222B722DE6E}" KeyPath="yes"> <util:XmlFile 
Id="ModifyConnectionString"
 Action="setValue"
 Permanent="yes"
 ElementPath="/configuration/connectionStrings/add[\[]@name='MYNAME'[\]]"
 Name="connectionString"
 File="[WEBCONFIG]"
 Value="Integrated Security=SSPI;Persist Security Info=False;Initial 
Catalog=[SQLDB];Data Source=[SQLHOST]"
 SelectionLanguage="XSLPattern"
 Sequence="1" />
</Component>

Summary of the existing web.config file:

<configuration>
  <connectionStrings>
    <add name=" MYNAME" connectionString="Integrated Security=SSPI;Persist 
Security Info=False;Initial Catalog=SOMEDB;Data Source=SOMEHOST"
providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>


Thanks for your help.

--
http://monochrome.me.uk/blog/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to