Alternatives To Web.config Files

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


Similar Messages:

How To Create A Common Web.config File And A Bunch Of Specific Web.config Files

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

Unable To Read Config Settings From External Config Files

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

Security :: Non-asp Files / Moved The Pages And Files To Other Folders And Set The Web.config File On This Folder?

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

What Are The Web.debug.config And Web.release.config Files For

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

.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

Configuration :: How To Use Multiple Web.config Files Using And VB

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

.net - Encrypting Config Files Info?

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

Configuration :: Transformation With Config Files?

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

Configuration :: Using .config Files In ClassLibrary?

Mar 23, 2010

How can I use web.config file in VB.net class library.

View 4 Replies

Mulitple Websites Using The Same Code But Different Web.config Files?

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

Configuration :: Custom Config Files Encryption

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

How To Prevent 'Publish Web' From Overwriting Config Files

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

How To Restrict Access To All Files In A Folder Without Web.config

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

Iis7 - 3.5 Application With Multiple Web.config Files (IIS 7)

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

How To Migrate Web.config Files To New Versions Of Framework

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

How To Handle Web.config Files - Alternative To ConfigurationManager

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

Security :: Encrypt External Config Files?

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

Architecture :: Subprojects Create Several Web.config Files?

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

Visual Studio :: Web.debug.config Files Are Gone?

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

Two Machine.config Files On Server - Which One To Edit And Verify They Are Being Used?

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

Visual Studio :: 2010 Missing Web.config Files?

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

Configuration :: Benefits Of Using Multiple Web.config Files In Web Application

Nov 8, 2010

let me know that what is the advantages / benefits of using multiple web.config files in web application

View 3 Replies

C# - Prevent Config Files Error To Render In Browser?

Jan 15, 2011

I have a custom config file in my application say my.config. Suddenly I ecnountered with some error regarding one of the settings inside the config file and the strange thing happens- my content of the config file get's rendered in the browser in the form of error. This is a big security issue for me. My question is how to prevent the content of my config files from rendering in the browser. Note I have already this setting in my web config:

<customErrors mode="Off" defaultRedirect="errors/default.aspx"/>

I am wondering why did not it redirect to error page? we had the settings turned onstill it displayed the straight error.

View 2 Replies

C# - Programmatically Edit External Config Files At Runtime?

Mar 1, 2011

By external config files, I mean .config files other than web.config. I've seen all the examples on how to edit web.config at runtime, but I want to edit a config file referenced by a configSource for appSettings. I want to modify only the external file and I will handle the app recycle.

I would like to use a built-in class to deal with the edits, but if the only option is a manual File open/parse, etc, then sobeit.

The general behind all this being a Settings page that is viewed at app startup, user sets their particulars and then saves the changes, then the real app starts up. quick and easy install app/configure page, so I'd like to leverage .config if at all possible.

FOLLOWUP - Quick Snippet to use XmlDocument to change an appSetting key value:

string path = Server.MapPath("~/my.config");
XmlDocument doc = new XmlDocument();
doc.Load(path);
XmlNode node = doc.SelectSingleNode("/appSettings/add[@key='myKey']");
node.Attributes[1].Value = "myVal";
XmlTextWriter writer = new XmlTextWriter(path, null);
writer.Formatting = Formatting.Indented;
doc.WriteTo(writer);
writer.Flush();
writer.Close();

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved