web deployment project, web.config section replacement is not work

I

Ira Grollman

While debugging why a web.config section replacement was not happening in the
real web application, I tried a simplified case, no replacement is enabled
and the connection string is not showing up?

Suggestions about what could be happening? The code:

Dim rootWebConfig As System.Configuration.Configuration
rootWebConfig =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(Nothing)

For Each objConnectionString As
System.Configuration.ConnectionStringSettings In _
rootWebConfig.ConnectionStrings.ConnectionStrings

lstCS.Items.Add(objConnectionString.Name & "|" &
objConnectionString.ConnectionString)
Next

Puts "LocalSqlServer|data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
" into the listbox.

The web.config is:

<?xml version="1.0"?>
<configuration>

<appSettings/>
<connectionStrings>

<add name="test" connectionString="placeholder"/>
</connectionStrings>

<system.web>
<compilation defaultLanguage="vb" debug="true"/>

</system.web>
</configuration>

Thanks, Ira

Also posted in ASP.NET forum without response
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top