Hello Rob,

I am trying to prepare an MSI for vs2010 web application project. During
Installation, I have to update the connection string in web.config so that
application points to production server.

I am taking database server, port and credentials from user through UI
dailogue box and trying to update the database connection string in
web.config. 

The Error I am getting is:

Failed to open the XML file: fil594EFB91CA3F8AABFA244E39F388B8F8 
System Error: - 2147024786

I am using the following code:

<Component Id="cmp0173C5D210EDBE4BCA294F162A2D384C" 
Directory="dir1BB95842B7E07694245A1BF7BE612641"
Guid="912202DD-90D7-4CFF-9038-BE9A449876D6">
<File Id="fil594EFB91CA3F8AABFA244E39F388B8F8" KeyPath="yes"
Source="C:\Documents and
Settings\bjasti\Desktop\deployment\devroot\Web.config" />
    <util:XmlFile Id="UpdateConnectionString"
              File="fil594EFB91CA3F8AABFA244E39F388B8F8"
              Action="setValue"
              ElementPath=
               
"//configuration/connectionStrings/add[\[]@name=’mainConn’[\]]/@connectionString"
             
Value="HOST=[DATABASESERVERNAME];SERVICE_NAME=[DATABASENAME];Integrated
Security=SSPI;"/>

My connection string in web.config:

<connectionStrings>
                
                <add name="mainConn" connectionString="Data Source=(DESCRIPTION 
=     
(ADDRESS = (PROTOCOL = TCP)(HOST = test)(PORT = 1521))     (CONNECT_DATA =      
(SERVER = DEDICATED)       (SERVICE_NAME = test)     )  
);Provider=OraOLEDB.Oracle; OLEDB.NET=true;PLSQLRSet=true;Password=test;User
ID=test;" />
                
        </connectionStrings>

Thanks,
Bharat Jasti
Web Application Developer
Rainbow Design Services Inc


-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Reg-Updating-connection-strings-in-web-config-tp5966709p5978110.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to