Web deployment projects and web.config file section replacement - does it work?

Hi,

I am trying to get to grips with the Web Deloyment projects and it keeps on failing to compile - falling over when it comes to the web.config file section replacement.

Has anyone got this bit working?  I keep on getting the error:

Error    1    web.config(1): error WDP00002: missing section appSetting.

I'm wondering if it has anything to do with the format of the appSetting file I am using.

I have added 'appSetting=/config/staging/appsettings.config;' to the deployment project and then have the appsettings.config file formatted like this:

<?xml version="1.0"?>
<appSettings>
  <add key="test" value="staging"/>
</appSettings>

Does that look right?

Any pointers would be appreciated.

Cheers,

Julian




Cheers,

Julian
0
jvoelcker
1/27/2006 3:03:17 PM
asp.net.visual-studio-2005 7760 articles. 0 followers. Follow

7 Replies
899 Views

Similar Articles

[PageSpeed] 45
Get it on Google Play
Get it on Apple App Store

Hi Julian,

Can you try removing the leading "/" in the appSettings reference and see if that works:

'appSetting=config/staging/appsettings.config;'

Thanks,

Scott

0
ScottGu
1/30/2006 12:29:53 AM
Thanks Scott, I'll give that a try, although have managed to get the connectionstrings section replaced by putting in the full path to the file and will try it also for the appSettings.

On a seperate note, what is the best way of getting web projects to compile in Release form - I gather with .Net 2.0 we have to edit the web.config file to achieve this (a really bad backward step IMHO) - is there some way to override this using MSBuild/the Web Deployment Project?

Thanks.

Julian

Cheers,

Julian
0
jvoelcker
1/30/2006 9:06:34 AM

Julian,  Unfortunately Web Deployment Projects don't expose a way to debug or release w/o the config change.  I've flagged the issue for investigation before the next refresh.  btw:  You can do this with Web Application Projects.  http://webproject.scottgu.com/

Thanks, Brad.

0
BradleyB
1/31/2006 3:17:23 PM
Hi Brad,

Thanks for the response.

I always tend to operate a single solution holding the website, web control and DAL projects ad am still doing so in VS2k5, which is what the Web Application Projects seems to be all about.

Does it provide anything more/less?

Is it possible to convert existing VS2k5 solutions?

Cheers,

Julian

Cheers,

Julian
0
jvoelcker
2/1/2006 12:04:01 AM

Hi Julian,

We are releasing a new refresh of the Web Application Project download next week that has a number of new features.  One of them is the ability to take pages built with the VS Web Site Project (which is the existing VS 2k5 solution) and convert them to use the new project model.  This should make it relatively straight-forward to convert an existing solution to use it (I'll be publishing a tutorial that shows the exact steps to-do it)

Hope this helps,

Scott

0
ScottGu
2/1/2006 2:41:54 AM
Hi Scott,

Thanks for the response.

Will you be including details of the benefits of the Web Application Projects, because apart from the ability to do release builds I cant see any over what I am doing now which is run a single solution containing two web projects, three projects for the DAL, one project for business logic and then another one for common controls.

Also, as new, but now regular reader of your blog it would be great to see a search facility on the site - you have so much great stuff on there it will make it a lot easier to find related articles, etc.

Keep up the great work.

Cheers,

Julian

Cheers,

Julian
0
jvoelcker
2/1/2006 3:06:20 AM

Hi Julian,

I'll try and blog next week (once the latest update is out) more about the Web Application Projects and the pros/cons of them.  If you are familiar with the VS 2003 web project model (and like that) then I think you'd probably like the Web Application Project approach -- since it will feel very familiar.

Hope this helps,

Scott

P.S. I'm planning on putting together an index at somepoint for my site -- there really is too much content there right now. :-)

0
ScottGu
2/1/2006 4:57:32 AM
Reply:

Similar Artilces:

web deployment project won't compile when doing a web.config file section replacement on a custom section
The custom section in my web.config file looks like: <configSections>    ....    <section name="management" type="Integration.CustomConfiguration.ManagementSection, Integration.CustomConfiguration" />    ....</configSections> .......<management>    ....</management> The web project builds fine, however, when I attempt to build using a deployment project (so that I can do web.config file section replacements) I get the following error:Error    34    An error o...

Web Deployment Projects
I've been using the new beta of the Web Deployment Projects. Cool stuff. One problem I have with it is this. I have specified some Web.config file section replacements. It is working just great, except that in the web.config file replacement files, some have comments in them that are not copied into the final web.config file. I wish that they were. For example, here is a snippet from connectionStrings.config file that will be inserted into Web.config...<connectionStrings>  <!--If using Oracle, please use below uncomment below section         <ad...

Web Deployment Project - Config Properties
I'm using a Web Deployment Project to compile my web site. In the Property Pages - Configuration Properties - Deployment section, there is an option to 'Enable Web.config file section replacement'. I have this working to replace certain sections of my web.config for each build config (release/staging/dev). I think this makes sense so other developers do not have to remember to change the web.config file. HOWEVER, this only seems to work when replacing parts of web.config; such as appSettings, connectionString, etc. This would require me to have separate config files for each section and bui...

Visual Studio 2005 Profiler "Launch Error: The web.config file xxx\web.config has been changed and backup information was lost."
Hi,  I am experiencing this error when trying to start a Visual Studio 2005 profiling session (Instrumentation) for my ASP.NET 2.0 web application.  I could not find any information regarding this issue and have no idea what might cause the problem, as the Visual Studio 2005 profiler already worked with that very same application, a couple of weeks ago. Anyone? Thanks in advance! Hello, Can you tell me if you found a solution for the issue because I'm experimenting the same issue ? Thanks !...

Web Deployment Project feature: partial replacement of web.config sections
Hi, I am using a web deployment project to deploy a web site in production. What I would like to do is set the cutomErrors tag under system.web without necessarily having to replace the entire system.web section. Right now, that doesn't seem to be supported. Thanks, SA. Correct - it is a limitation that you can only swap out entire sections in web.config upon deployment. -- Bash This posting is provided "AS IS" with no warranties, and confers no rights....

help!!
Hi,     I have a website developed using c# vs 2005 (.net 2.0) and i added a web deployment project to it. I also have a customconf.config file which is a replica of the web.config but with some changes in the connection strings. I specified in the property pages of the web deployment projects as "connectionStrings=customconf.config;" and the problem is that when I build this, it copies the customconf.config file to the build folder, deletes it (i saw it getting copied into the folder and then disappearing automatically!!) and says the customconf.config could not be found. ...

Help with web.config file section replacement (new web deployment proj)
Hi there,Can anyone help?I want to be able to replace my connectionstring from my web.config.From reading the white paper i specify a config file (text file) which i presume goes in the same directory as the web deployment project files???Then if i want to replace an entire section then i just do something like thisconnectionStrings=productionString.confor example which i am led to believe replaces the entire section so what does the file need to include also the <connectionStrings> and </connectionStrings>?????So if i have more than one connection string in there and i just want...

I Have visual studio 2008 how can i convert my web project to work in visual studio 2005?
 I Have visual studio 2008 how can i convert my web project to work in visual studio 2005? where is the option to convert the project to work in vs2005 area? The best way to go about this is to create a new web application by going to:  file -> open -> website -> then select the folder that your website lies in then save the solution as a visual studio 2005 project. but i dont have in save as property, the ability to convert the project to work in visual studio 2005   ok, then lets create a new asp.net web application, then add the existing files from t...

Web Deployment Projects: Web.config sections <system.web>
I like "Web Deployment Projects" a lot - WELL done!I encounter the following by trying to replace the system.web config section in Web.config.During the build I get   Web.config (1): error WDP00002: missing section system.web.I can replace other parts of the Web.config, like appSettings, connectionStrings and even system.runtime.remoting, but not system.web.Any ideas? Thankx! I think you have the honors of finding the first bug.  We're using Configuration.Sections[] to acess the replaceable sections and it doesn't appear to work with system.web.I'll enter the bug. ...

Web Deployment Project deploying files not included by Web Application Project
Recently my boss asked me to find a way to share a web site project between 2 separate projects which will only share a subset of the files in the folder.  I created 2 web applications projects in the folder and eliminated the web site project.  I discovered when I publish the web application projects, that it wasn't compiling the .as*x pages, so I looked into web deployment projects.  The problem I'm having with web deployment projects is that when I build them from the solution configuration, it copies all the files in the web project to the deployment folder and I c...

Website Project vs. Web Application Project in Visual Studio.net 2005
 Website Project vs. Web Application Project in Visual Studio.net 2005 What are the main benefits of using a Web App project over a Website project or vice-versa? Web App Project: You have to jump through hoops to use edit and continue with a Web App where in a website it just works. I’ve figured this out with the help of ScottGu. Thanks! http://weblogs.asp.net/scottgu/archive/2006/05/08/VS-2005-Web-Application-Project-V1.0-Released.aspx Web App Project: what are the *.aspx.designer.cs files for? Website Project: how do you set up the project to use a ...

Web Deployment Project problems replacing sections in system.web
I downloaded the latest version of the deployment tool but I still can't get it to replace anything in the System.web section..  I have tried just replacing the one piece in the <system.web> section like system.web=newtheme.config where the file newtheme.config has this line: <pages theme="WildTheme"/> Then I tried replacing the entire system.web section by doing system.web=newsystem.config but that didn't work either.  I just get the error "missing section system.web." Has anyone got this to work?  The release notes says it is suppose to work. Thanks ...

VS 2005 SP1 + .NET AJAX => automatically adds web.config in nested Web Application Project when opening project or solution
I get a 'Configuration Error' on an aspx page because VS added automatically a web.config to my nested Web Application Project where no web.config file should be. This effect I have noticed since I have installed SP1 and .NET AJAX Extensions. Why is VS 2005 adding the web.config file and how can I disable this behavior? Following is the content of the automatically added web.config file (comments omitted): <?xml version="1.0"?><configuration>    <appSettings/>    <connectionStrings/>    <system.web> &...

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See www.iis.net for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

Web resources about - Web deployment projects and web.config file section replacement - does it work? - asp.net.visual-studio-2005

Chemistry and Metallurgy Research Replacement Facility - Wikipedia, the free encyclopedia
The Chemistry and Metallurgy Research Replacement Facility , usually referred to as the CMRR , is a facility under construction at Los Alamos ...

Unsportsmanlike Conduct Called On Replacement NFL Ref Due To Facebook Posts
One of the National Football League ’s replacement officials was removed from his assignment to work the New Orleans Saints ’ visit to the Carolina ...

Facebook Home: Replacement Home Screen for Android
Nicely-designed phone interface that I would personally never want to use. (They’re embedding Helvetica rather than using Google’s crummy Roboto. ...

The Replacements (@TheReplacements) on Twitter
Website has been fixed. Stay tuned to see what other shenanigans we may or may not have up our sleeves... theReplacementsOfficial.

App Store - The Complete Hair Replacement Guide
Get The Complete Hair Replacement Guide on the App Store. See screenshots and ratings, and read customer reviews.

Nexus 4 Screen Replacement + Frame/Bezel Exchange - YouTube
For the parts or tools needed to perform this repair visit http://www.repairsuniverse.com/lg-nexus-4-e960-screen-replacement-repair-parts.ht ...

'Demtel man' Tim Shaw announced as Mark Parton's replacement on 2CC
... breakfast host. But wait, there's more... 2CC has a new breakfast host to replace the outgoing Mark Parton ; but wait, there's more. His replacement ...

Big Bash League: Sydney Sixers' Jackson Bird ready to soar as Brett Lee's replacement
Jackson Bird says it's a mistake to compare him to Brett Lee, but if the Victorian had Lee's speed he'd likely be in Australia's attack for the ...

Soundwave cancellation: Plan emerges to crowdfund replacement mini-festival
Bands unite to organise replacement concert tour to Soundwave Music Festival.

Harjit Sajjan Hints F-35 Won't Be Excluded From Jet Replacement Competition 34
One of the Liberals' top campaign pledges was to buy a less expensive aircraft.

Resources last updated: 1/2/2016 3:04:56 AM