473,804 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.Configur ation.Configura tion
rootWebConfig =
System.Web.Conf iguration.WebCo nfigurationMana ger.OpenWebConf iguration(Nothi ng)

For Each objConnectionSt ring As
System.Configur ation.Connectio nStringSettings In _
rootWebConfig.C onnectionString s.ConnectionStr ings

lstCS.Items.Add (objConnectionS tring.Name & "|" &
objConnectionSt ring.Connection String)
Next

Puts "LocalSqlServer |data source=.\SQLEXP RESS;Integrated
Security=SSPI;A ttachDBFilename =|DataDirectory |aspnetdb.mdf;U ser Instance=true
" into the listbox.

The web.config is:

<?xml version="1.0"?>
<configuratio n>

<appSettings/>
<connectionStri ngs>

<add name="test" connectionStrin g="placeholde r"/>
</connectionStrin gs>

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

</system.web>
</configuration>

Thanks, Ira

Also posted in ASP.NET forum without response
Nov 26 '07 #1
0 2171

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1166
by: Lloyd Dupont | last post by:
Hi! I'm a newbie ;-) I started to write an excessively simple ASP.NET "utility" web app, named WebSite1. Inside of it I'm using FreeTextBox (http://www.freetextbox.com) Then I modified the Web.config file as follow (to recognize the tag FTB): === <system.web> <pages> <controls> <add tagPrefix="FTB" namespace="FreeTextBoxControls" assembly="FreeTextBox"/>
0
1226
by: Stéphane KIES | last post by:
Hello, I cannot replace the <system.web> section using the Enable Web.config file replacement feature of Web Project Deployment for Visual Studio 2005. appSettings=myFile.config works but system.web=myFile.config generates the following error : error : web.config(1): error WDP00002: missing section system.web Is it possible to replace the system.web section. What is the correct syntax.
1
2609
by: Grant | last post by:
Hi, When using the web.config file section replacement functionality, we are unable to replace any section other than appSettings. We have tried compilation, system.web etc. Our section replace code is appSettings=stage.appSettings.config compilation=stage.compilation.config
0
1128
by: Otis Mukinfus | last post by:
I'm trying to use the Enable Web.config file section replace ment option, but can't seem to get it to work. Here is a sample of the section I put in a file named 'ConnectionString.config'. <connectionStrings> <add name="SomeConnectionString" connectionString="Data Source=SomeDataSource;Initial Catalog=SomeCatalog;Persist Security Info=True;User ID=AUser;Password=APassword" providerName="System.Data.SqlClient" />
0
2106
by: Brian McCullough | last post by:
Hello, I have a Web Deployment Project (WDP) for my Web Site Project (WSP) (not a Web Application Project). I put an additional prodAppSettings.config file on my development machine and enabled web.config file section replacements for the appSettings element. The replacement is working fine, except, that it is copying the prodAppSettings.config file to the output directory. Is there a way to prevent my prodAppSettings.config file...
0
1028
by: Stupid48 | last post by:
I like the web deployment projects add-in for VS 2005. The web.config section replacement is especially useful. I'm a bit confused about an aspect of this. We develop against remote web servers and Attach to the remote debugger remotely. This whole deployment thing does not take that into account (at least from I can undersstand). In VS 2003, we could switch between release and debug on the same web server and still run the site from...
0
1865
by: =?Utf-8?B?SWFu?= | last post by:
Hi, I'm using VS 2005 SP1 with Web Deployment Project download v8.0.51103, according to the Add/Remove programs applet. I've got a file based web service project with an associated web deployment project. I want to build my release version of the wdp with debug info so I can run NUnit on the output and doing that causes the wdp build to set <compilation debug="true"/in the web.config file. I've setup a replace config section...
3
2291
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
I've added a web deployment project and want to use the config section replacement but I'm obviously not understanding something. I have set up an alternate appSettings file, test.appSettings.config, and when I build the appSettings are correctly overridden, but I also end up with a copy of test.appSettings.config in my web site. If I have config sections for several environments they all get copied. How do I stop the copy? I wondered...
1
1283
by: Justin Friel | last post by:
Hi, I have been using a web deployment project with Visual Studio 2008 Standard Edition to deploy a website. There are a couple of settings which aren't working exactly as I expected and was wondering if anyone on the list has more info. First, I'm trying to use the Web.config file section replacements feature to replace a custom section in my config file. The project can replace the appsettings and connectionstrings sections just...
0
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.