Should local Web.config overwrite Production Web.config

I have a hosting service that supporst ASP.net 2.0.  I have an SQL Server 2005 Express account with them.  I have just started using them and have written my first web app.

I have read quite a few things but it is not clear to me whether or not when I copy my web site (using VWD) if I should copy the web.conf file or not.  My local app runs fine but after copying everything to my production web site, I am not able to access the production web site in my browser.  I suppose it may have something to do with the question I've asked concerning Web.config.

Is there a particularly helpful white paper on this somewhere or can somone point me in the right direction here?

 

 

 

 

0
WoodyS
3/9/2006 7:26:15 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

2 Replies
1051 Views

Similar Articles

[PageSpeed] 32

Hi,

yes the web.config should also be uploaded. Look at the web.config just like CSS. The most descent setting wins. If you have a web.config in your root and another one in a subfolder which overrides a certain setting then that setting wins in that subfolder. Actually the default web.config settings are set at machine level in the machine.config file.

Also make sure that you change the connectionstrings from your localhost server to the appropriate connectionstrings of those on your webserver.

Grz, Kris.


Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII
3/9/2006 7:33:11 PM

This isn't a yes/no question unfortunately.  The web.config is needed because it has settings needed by your application.  Unfortunately, some of those settings may be machine-pecific.  Database connection strings for example.  Possibly security groups and names.  Authentication methods.  Custom Error settings.

You'll need to copy the web.config and test.  If there are problems, track them, down and fix the production web.config.  If you deploy the site again or in anyway copy the web.config back to the production system, make sure you back the old one up first for when you need to merge the two.

Jeff


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
0
jeff
3/9/2006 7:40:42 PM
Reply:

Similar Artilces:

running 2 web.configs in the same website 1 in /web.config and one in /swf/web.config
Im having issues doing this. and when i remove the authentication from the swf/web.config it still doesnt seem to be applying to the child website at all. Whats the proper way to set a child website? Thanks!!  The lower most web.config overrides all previous settings. So if you remove the section from the /swf/web.config whatever settings you have in the web.config in the next higher level will have an effect on the content of the child folder.So instead of removing a section, try giving appropriate settings in the /swf/web.config....

Merging my web.config.mylibrary with the web.config
I see multiples web.config files in the framework 2.0 folder.  There is a way to had a web.config.mylibrary file that contains part of the configuration section.For example, I want that the profile section to be in the web.config.mylibrary file and when the web site will be load, the two web.config will be merge.  Is it possible to such thing ? Hi Biz, It is possible to-do this using the configSource property on configuration section elements.  You could then store different configuration sections in different configuration files in a distributed way.Here is a MSD...

Need to put this in a web.config file. Transfer a collection from app.config to web.config.
<!--<setting name="Groups" serializeAs="Xml"> <value> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <string>GL CA Corporate Data</string> <string>GL CONT Contractors</string> <string>GL IT SolutionDelivery</string> </ArrayOfString> </value> </setting>-->   I need to put this in the below web.config.<?xml version="1.0"?><!-- Note: As an alternative to hand editing this fi...

How do I merge web services' app.config with web app's web.config? Help!!
I have a web application project that uses a separate class library containing web service references (service layer). I want to be able to configure the web reference URLs dynamically and I know you can set this up by setting the URL behavior to  'Dynamic', etc, etc. The problem is VS2005 puts the URLs in the project's app.config file. When the class library becomes a DLL component, I have no way of accessing the app.config file.Is there a way to make the web reference project to look for the URLs in the web.config instead of its app.config? Or is there a way to merge this app.config w...

Isolating web.config from it's parent web.config
I need to run an application withing a sub-directory of another application. Basically, I need to install an old version of DNN as a subdirectory of a current DNN2 installation. I get a problem of conflicting web.configs. The subdirectory want to use it's parent directory's web.config file. I thought by making the subdirectory an "application" in IIS that it would use the web.config in it's own folder but instead, it is referenceing the web.config file from it's parent. Any thoughts or help would be appreciated. Thanks, Stef. Stef, Because of the hierarchical nat...

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...

Web Crawlers Web.config and .Net Roles/Membership
 I have a subfolder in my asp.net 3.5 application that contains a Web.config file that only allows certain roles to access one of the pages. My question is whether or not web crawlers can index that page's content.http://www.geneangelo.com web crawlers crawl only on publicly accessible sites (as anonymous user)Patrick OliverosWeb Developer - Emerson Electric Asia, Ltd. - ROHQwebthinker.wordpress.com  Great, thanks a lot.http://www.geneangelo.com...

After migration from .Net 1.1 to .Net 3.5 do I have to incorporate new web.config settings in old *.config file
Hi,I have successfully migrated web application from .Net 1.1 to .Net 3.5. Could you let me know whether I have to incorporate setting in new web.config (this new web.config file was generated automatically due to migration) into old *.config file?FYI: Old *.config file contains all application level settings required. So I will continue to use old.config file by removing new web.config file. Settings which are in new web.config file are:<configSections><sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,...

~/Web.config read from project root but written to ...\Common7\IDE\~\Web.config ??
 Hey all,I'm trying to edit my Web.config in runtime, but I get some weird behaviour. Probably something simple I couldn't find on the net. But I'm new to this, so bear with me.In my code I open the ~/Web.config file and it reads it from the rood of my project folder. When I try to save it to ~/Web.config, it writes it to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\~\Web.config instead.How can the same relative path point to 2 places? Read from here but write to there ?!? How do I solve this?Here is my sample code:Default.aspx<%@ Page Language="C#" ...

web.config file of root directoy interferes with the sub-application web.config.
Hello! I encountered a problems when I added new sub-application to my application,  with its own web.config, When I try to open page www.mypage.com/subapplication/ It reads the web.config of www.mypage.com and throws an exception (I think it tries to loadsome dlls from root-bin directory (exactly ATLAS files..)  <add name="ScriptModule" type="Microsoft.Web.Services.ScriptModule"/> - exception on this line ) But why it reads the web.config of root dir? What can I do to solve that problem? Thank you.Artashes This is the expected behavior. web.config are inher...

Updating Web.Config( ^SqlConnectionString^ was not found in web.config. Connection String was not updated).
hi ppl i installed the forum and when it was fininshed im not getting the fierst screen. when i wrote it myself on the explorer http://localhost/Forums it gave an error like this:::::::::::::::    Login failed for user 'amit'. Reason: Not associated with a trusted SQL Server connection Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'amit'. Reason:...

Deploying a web project without overlaying local web.config
I want to start deploying a web project instead of source code.  I have at least two problems I need answer for. 1.  I am converting an existing ASPc project and there are still ASPc pages.  Will they stay and still execute as usual even though the rest of the pages are just markers to code contained in a DLL? 2.  I have 41 customer sites.  Each site has a different ConnectionString section in the Web.Config.  They also have different appSettings Section because of different parameter settings for each site such as Number of Licenses, Proxy Server settings, ju...

how to get the access to modify web.config when running web app?
hi all, I am working on a web app that modification to the web.config may be needed when user logs on as administrator. when user logs on as an administrator, s/he cold choose to change some settings in the web.config. My question is, how to grant the permission of "modify" web.config to this kind of user? I know that all the user access the resources through "anonymouse access", and they use account "XXX\Iuser_XXX" to access the web.config, but this account (or user group) has no access "modify or write" to web.config. When config.save(0 used, the user must have the write perm...

What is the way to let second level web.config inherit from default web.config directly?
I have a virtual directory on my site, it has nothing to do with other content of the site, I don't want it inherit settings from the sites' web.config, is there a way I can do that? thanks!...

Web resources about - Should local Web.config overwrite Production Web.config - asp.net.getting-started

Post-production - Wikipedia, the free encyclopedia
Post-production is part of filmmaking and the video production process. It occurs in the making of motion pictures , television programs , radio ...

Peacock Productions Takes on The Wiz
How do you produce a “making of” documentary of a “live” TV show? For the third year in a row, NBC’s Peacock Productions will show us with The ...

Tesla Model X production starts in earnest, pricing revealed
(credit: Tesla) Several months ago we found out pricing for the fully loaded "Signature" edition Tesla Model X electric SUV. Now, we've got ...

First production Bentley Bentayga rolls off the line
... , Bentley , UK , Crossover , SUV , Luxury , Performance After four years of work and an 840-million-pound investment, the first production Bentley ...

Samsung's first 128 GB DDR4 RAM modules for servers go into production
Samsung has announced that it is starting mass production of the industry’s first "through silicon via" (TSV) 128GB DDR4 memory modules for high-end ...

Oil Patch Problems: Rigs Down 60%, Production Down 3%, $40-$50 Price Doesn't Work
... the price of oil, US producers used enhanced techniques to get more and more oil out of existing wells. So even as rig counts collapsed, production ...

AP: ISIS pursuing production of chemical weapons, officials say
"They now have complete freedom to select locations for their labs and production sites," one Iraqi official tells AP

Production Chevy Bolt To Be Shown At CES
Originally published on EV Obsession. The production version of the 2017 Chevy Bolt will be making an appearance at the upcoming Consumer Electronics ...

'Wonder Woman' production is underway, revealing new look for the heroine and cast list
To celebrate Warner Bros.' announcement that the new "Wonder Woman" is in production, actress Gal Gadot shares a photo of herself in costume ...

The CW Developing ‘Cry’ Cryogenic Drama From Paulist Productions
... at the CW — the network is working on Cry , a drama about the prospect of eternal life via cryogenic preservation that comes from Paulist Productions, ...

Resources last updated: 12/1/2015 6:27:03 PM