web-config

How do I set a single virtual directory of my web app to not inherit web.config?

I have a virtual directory setup in one of my web apps that needs to not inherit the web.config of the main app so it can run on it's own. I am wondering how I can do this because right now when I hit it (mainwebapp.domain.com/virdir) it throws an error saying it can't find some dependencies that are listed in the main apps web.config (s...

Advanced tasks using Web.Config transformation

Does anyone know if there is a way to "transform" specific sections of values instead of replacing the whole value or an attribute? For example, I've got several appSettings entries that specify the Urls for different webservices. These entries are slightly different in the dev environment than the production environment. Some are less...

Migrating web.config files to new versions of framework

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

Do your admins modify your web.config files?

I'm wondering how other developers are handling source code conflicts for config files when system admins modify them in production. For example, if a system admin updates a appsettings key on the production server and then my team publishes out a project, it will overwrite that key. How do you handle config file updates in your organiz...

How do I include a web.config custom section schema without having to update each dev machine?

Hi, I've added a new custom section to the web.config of an application. I have also created a corresponding schema file for the new section definition. How do I include the schema reference in the web.config so that any developer editing the section has intellisense enabled when dealing with my new custom config section? I've seen ...

Web.config Best Practices

I'm just looking for some good tips for a generic web.config template I'm putting together. I found something similar here http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=307 Has anyone come across a good web.config template or best practices? ...

ASP.NET: Turning on errors

This is what I see when I visit my web site. How do I instead get the Yellow Screen of Death so I know what the error is? I have set customErrors to "off". ...

web.config custom error path

<httpErrors defaultPath="/Views/Error/Error.htm" errorMode="DetailedLocalOnly"> <clear /> <error statusCode="404" path="/Views/Error/404.htm" /> <error statusCode="500" path="/Views/Error/500.htm" /> </httpErrors> Is the paths over here are valid? how can I use valid relative path? ...

my web service works locally but, not when it is deployed

When I deploy my web service, I get the following error: There is no build provider registered for the extension '.svc'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'. I found one thread (http://forums.asp.net/t/...

Managing web.config for teams in VS2010 & TFS

With VS2010's mandate that web.config be included in the project, how do we allow everyone to keep their own custom config file without getting into source control problems? Previously, we would simply leave web.config out of our project, allowing everyone to keep their own local version of web.config on their machine. We moved to VS201...

Use HTML markup into web.config file

Hi, i've to display a messagge in my homepage (default.aspx) different for each "installation" of my web app. i would like to avoid to make a call to database to show this message.. so i've thougth to use web.config to store something like this <add key="WelcomeString" value="lorem ipsus <b>doloret sit amen</b>" /> But i've noticed ...

Unrecognized configuration section httpHandlers in Web.Config with Microsoft Visual Web Developer 2010 Express

Hi all, I am in need of some help with an error message I get with Microsoft Visual Web Developer 2010 Express. I would like to create a gallery for my site so I downloaded the NotesForGallery from codeplex. I have added the reference into the project like it told me to in the installation instructions. The instructions then say Re...

where should i put the configuration files in a webservice

Could some one help me on this problem. i have webservice , which reads data from configuration files. When i run this webservice from eclipse , i give absolute the path for these webservices of these configuration files , but when i shift the webservice in to server and run, it can not read the config file. so how can i solve this probl...

Encrypt Connection Strings when using Linq To SQL

What is the best practice for encrypting the connectionStrings section in the web.config file when using LINQ TO SQL? ...

Appropriate way to bring web.config changes into force

Hi, what is the suggested way to make web app see new configuration in web.config ? restart IIS stop/start app pool recycle app pool custom web page that does something in code? Thanks,Pawel ...

CakePHP on IIS7 - no css/js/img

I can’t get the css, js and img loaded. I’ve been using the web.config out of this article: http://book.cakephp.org/view/1533/A-Note-on-mod_rewrite Please any suggestions… ...

Configuration and Views

Hi all, I've been developing an application using asp.net MVC, and I have some configurations that influences in process of render a view. For example, a user can choose (in an configuration of system) if a field should appear for a management of records in an area of the system. So, I have an class called AppConfiguration has some prope...

Can StructureMap be configured so that one can use different .config settings based on whether the project was built in debug or release mode?

I know that in StructureMap I can read from my *.config files (or files referenced by them), when I want to pass specific arguments to an object's constructor. ForRequestedType<IConfiguration>() .TheDefault.Is.OfConcreteType<SqlServerConfiguration>() .WithCtorArg("db_server_address") .Equa...

can the web.config be changed so roles wouldn't work any more?

I have had two instances of this problem, first on my local computer, now on the main site. Users can log in to the site, but it doesn't seem to recognize their roles. When I log in (which the database still recognizes as having the role admin), the code does not recognize it as being in the admin role. If there are other web.configs i...

External config file to be used by multiple DLLs.

Hi, I have multiple DLLs that are used to read/write data into my database. There is a presentation layer DLL and a data access layer DLL. I want these DLLs to share a set of the connection strings. My idea is to store the connection string in a seperate DLL in the external configuration file. I'm not sure whether it's a good idea an...