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

Discussion in 'ASP General' started by Ira Grollman, Nov 26, 2007.

  1. Ira Grollman

    Ira Grollman Guest

    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
    Ira Grollman, Nov 26, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian McCullough
    Replies:
    0
    Views:
    486
    Brian McCullough
    Feb 16, 2007
  2. =?Utf-8?B?SWFu?=
    Replies:
    0
    Views:
    386
    =?Utf-8?B?SWFu?=
    Jul 1, 2007
  3. =?Utf-8?B?Q2h1Y2sgUA==?=

    web.config section replacement

    =?Utf-8?B?Q2h1Y2sgUA==?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    2,642
    Steven Cheng[MSFT]
    Aug 7, 2007
  4. =?Utf-8?B?RHVrZSAoQU4yNDcp?=

    Web deployment project - config section replacement files

    =?Utf-8?B?RHVrZSAoQU4yNDcp?=, Aug 31, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    537
    Steven Cheng[MSFT]
    Sep 3, 2007
  5. kampy
    Replies:
    9
    Views:
    318
    Steven D'Aprano
    Oct 19, 2012
Loading...

Share This Page