.net - How To Maintain Web.config Files
Feb 2, 2011
I'm interested to know how others maintain their web.config files for deployed applications. (assuming no automated deployment mechanism - that is out of the scope of this question)So during development, some developers might make use of web.config transformations, build/publish their projects (debug/release, test/live configurations), then deploy all published artifacts to a web server and set up IIS. Some developers might build/publish their projects, deploy published artifacts to a web server, set up IIS, then manually update the web.configs for the specific environment (test/live, etc) they are deploying into
View 2 Replies
Similar Messages:
Feb 16, 2011
Currently, I work on an ASP.NET project which is hosted under version control and is used on several developer machines, tester machine and production environment.
In three cases, configuration (Web.config) may be different. For example, developer and tester environments use testing SQL Server, whereas in production environment, another SQL Server is accessed, so the connection string is different in those cases.
We want to keep three versions of Web.config in subversion. But modifying each of three files every time we need to add, remove or change a common setting is annoying: it would be nice to have a common, master Web.config, which will be inherited by each of the three Web.config files.
How to set up an ASP.NET project which will use a master configuration file and different slave configuration files on different machines, thus sharing the same project/source code/configuration files in subversion?
View 2 Replies
Sep 1, 2010
We are experiencing some strange behaviour on one of our ASP.NET web servers (Windows 2003 64-bit). After some activity, two third-party controls are unable to run correctly. One is log4net (it does not write error messages out) and the other is a menu control (it displays eval message instead of picking up its license). The one common thread is that both controls pick up their config from external config files (linked to from web.config).
Just wondering if anyone has any thoughts on this or experienced this in any way. Is it related to file/folder rights? The server has been running fine for a while and just started exhibiting this behaviour. Perhaps it occurs around the time the worker processes are recycled.
View 1 Replies
Apr 4, 2011
In my asp.net project currently i have business logic and and data access code in two sub folders(BLL,DAL) which are itself located web site project's app_code folder. I need to segregate them to two separate projects(one project for business layer and one project for Data access code).
How can I maintain connection strings necessary to Data access project which are currently in web.config file?(i.e if I choose Class library template for creating DAL and BLL projects) How can I maintain various other web.config key values that are currently used in BLL, DAL code files?How can I deploy compiled project? (ie Web site project I am currently deploying bin folder to Staging> production but this way where should i put DAL.dll and BLL.dll and relevant config files)
View 5 Replies
Jul 1, 2010
I was following the tutorials from this two sites:
http://www.15seconds.com/issue/070104.htm
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!
The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the
[Code]....
on the web.config new folder and on the web.config website´s root.
It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.
View 4 Replies
May 7, 2010
I just upgraded to VS 2010 and MVC 2.0 and I noticed the web.config has two additional files attached to it? Are these files used to specify debug and release specific settings, so you don't clutter up the main web.config?
Does it even make sense to place a connection string in the root web.config file if I have have a local and remote one in the debug and release web.configs respectively.
View 1 Replies
Jan 15, 2010
I am trying to set up a solution - projects folder structure. I am trying to keep CSS, master pages, Themes, Images and login page as a common web application project and reference them when needed in any other web site or web application in the same solution. Is it possible to do it? If so, is it a best practice? If not, what is the best practice to do this?
View 4 Replies
Jun 6, 2010
In my experience, web.config files are widely reviled. In particular, I have found them difficult to manage when you have multiple environments to support, and fiddly to update due to the lack of validation at update-time and the verbosity of XML.
View 2 Replies
Nov 16, 2010
I have two webconfig files, on in the root directory and one in the other directory. I dont know how to access or specify for the particular pages or APIs those are in the folder.Root webconfig file used by another section and the 2nd one accessed by another api. I have no idea about that
View 3 Replies
Jan 13, 2010
I have many ASP.NET applications running on server and i want to encrypt the web.config file for each.Is there a way I can encrypt all config files using single class/app or do i have to write separate code under each solution/project to encrypt config?I have idea how to do one file in a project usinghttp://davidhayden.com/blog/dave/archive/2005/11/17/2572.aspxBut i want to use a centralized or single app to encrypt all
View 2 Replies
Aug 17, 2010
I am currently trying to publish a web application in TestRelease mode and when I do, the following dll is compiled and put into the bin folder.Microsoft.VisualStudio.Settings.dll.I do not get this dll when I comple in release or debug mode so wondered if there is a setting I can change so this dll does not appear in the bin folder when I compile in TestRelease or TestDebug mode ?When I get that dll in the bin folder and try to deploy the application to our test server, I receive the following message: Could not load file or assembly 'Microsoft.VisualStudio.Settings.dll' or one of its dependencies.Any suggestions on why that dll appears in the bin folder and how I can prevent it from being deployed when I pusblish through visual studio ?
View 1 Replies
Mar 23, 2010
How can I use web.config file in VB.net class library.
View 4 Replies
Oct 18, 2010
I have mulitple websites using the same code but different web.config files. Is there a way where I can achieve not having multiple copies of the same code? so its easy to mantain?
View 1 Replies
Mar 24, 2011
I have a couple of configuration files flxConnection.config and flxSecurity.config files which are being referenced from the Machine.config file like below.
<securitySettings configSource="flxSecurity.config" />
<connectionStrings configSource="flxConnection.config" />
I would like to encrypt the files (a) flxSecurity.config and (b) flxConnection.config using the RSAProtectedConfigurationProvider using a custom RSA key, which can be deployed to other servers. How is that possible? If possible, looked at a variety of stuff in the internet and they all seem to be referring to either Web.config or Machine.config encryption which is pretty straight-forward. This is how the flxConnection.config looks like,
<?xml version="1.0"?>
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
This is how the flxSecurity.config looks like,
<?xml version="1.0" encoding="UTF-8"?>
<securitySettings>
<add key="APC_APP_ID" value="apcrpt"/>
</securitySettings>
View 3 Replies
May 11, 2010
When I publish my Asp.Net MVC website to the production server (via VS2008), the web.config & castle.xml files are overwritten. The content of these files is obviously different between my local dev environment and the production server.How do I prevent these files from being published?
View 2 Replies
Jun 14, 2010
I need to restric access to my admin folder to certain people. Those with no authentication ticket should be redirectered to a "not allowed page". How do I identify all pages in my admin folder. I have so far but is it OK?
If url.Contains("/admin") Then
'If authentication ticket incorrect then
`Response.Redirect("~/notallowed_admin.aspx")`
End If
And not, I cannot use my web.config for this particular issue.
View 2 Replies
Nov 28, 2010
We are working on a web application that creates more web applications.Each web application will have to get a Url Rewrite rule (URL REWRITE MODULE 2.0).As far as I know, there's no way to add such rules without modifying the web.config file (am I right??).So my plan was to work with multiple web.config partial files. One main .config file, and lots of .config files per application (every file will contain it's web application url rewrite rules).This way sounds a little bit messy, but I can't think of anything else, and suggestions will be welcomed.
View 1 Replies
May 27, 2010
I've migrated two ASP.NET MVC 1 solutions to MVC 2 and therefore kept my web.config almost the same, just changed the necessary stuff in it as documented in Release notes.Although I created a few new test MVC 2 webapss from scratch, until now I haven't really checked out the default new web.config. As I created a new empty MVC 2 Web App today and opened the web.config, I discovered it's much smaller. There's almost no modules, no handlers, etc.
View 1 Replies
Aug 4, 2010
The other day I came across an alternative way of accessing web.config configuration in some article. It allowed to:provide path to web.config file modify web.config configuration at runtime like:config.MySetting = "new value";load web.config from another web application in the same IIS (I'm not sure about it)work with configuration using class instance instead of static ConfigurationManager class
View 1 Replies
May 6, 2010
Our conn strs reside in an external file <connectionStrings onfigSource="ConfigurationConnectionStrings.config" />Is there a way to encrypt this external file either using aspnet_regiis or System.Configuration?
View 4 Replies
Jul 25, 2010
my subprojects creates serveral web.config files? I have solution that consists of 10 projects and I want everyone to compalie but the one in the top root. Now my problem is that my subprojects are all located inside folders in the root and my subprojects generates each a web.config. Thhis doesnät work very good so what should I reconfigure would you say?
View 2 Replies
Oct 6, 2010
When I want to build my website it complains the web.debug.config file cannot be copied.I can't find this file, how can I restore it?I do have a web.config file!
View 2 Replies
Jul 15, 2010
I need to do some performance tuning and need to modify the following settings: processModel, httpRuntime, and connectionManagement. Simple enough I suppose, but I'm not sure which of the two machine.config files to edit, or do I edit both?
Windowsmicrosoft.net Framework v2.0.50727CONFIGmachine.config
Windowsmicrosoft.net Framework64 v2.0.50727CONFIGmachine.config
As a follow up question, how do I verify that the settings have been applied? I should mention that the server is running Windows Server 2003 Enterprise (64-bit) with IIS 6.0 (64-bit) and MSSQL Server Enterprise 2005 (64-bit).
View 2 Replies
Aug 9, 2010
I just moved into a new computer running Windows 7 pro, and I installed a new copy of VS2010. Now all of my old sites that I made in VS2008 do not have their web.config files. Does anyone know what happens to them in VS2010, or Windows 7?
View 3 Replies
Nov 8, 2010
let me know that what is the advantages / benefits of using multiple web.config files in web application
View 3 Replies