cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sripati04
Level 2

How to escape &(ampersand) in web.config file while installation

Dear all,

I am using InstallShield 2009 for package creation.In "web.config" file, character "&"(ampersand) needs to be added to config file after installtion.
But after installtion instead of adding only "&",it is adding as "& amp;" in "web.Config" file.

I am using below Install script for creating connection string for "Web.Config" file,

sSQLConnString = "provider=System.Data.SqlClient;provider connection string="Data Source=devserver;Initial Catalog=PIDMS_SL_MIG_US;Persist Security Info=True;User ID=sa;Password=light$5;MultipleActiveResultSets=True"";

So what is the escape character for "&" while creating web.config file through installation.
Labels (1)
0 Kudos

(1) Reply
sthoeum
Level 3

I have the same issue with a basic msi, using xml file changes.
I want my connection string to output & and not &
Please reply.
0 Kudos