web-config

live asp.net web.config settings

I've only recently started working with asp.net and c#. Is there a standard practice set of web.config settings for a live final website? There seem to be a ton of options available and I'm looking to streamline performance, close possible security holes and other unecessary options. ...

Removing web.config from subversion (ASP.NET Project)

I have a project which is source controlled using Subversion and VisualSVN. Since the version of web.config is different on the server and the developers' computers I want the file to remain on the computers but to be ignored by Subversion. I added it to the svn:ignore but it still remains (and still has a red exclamation mark too since ...

Detecting Web.Config Authentication Mode

Say I have the following web.config: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <authentication mode="Windows"></authentication> </system.web> </configuration> Using ASP.NET C#, how can I detect the Mode value of the Authentication tag? ...

Relative path in web config

How can I have a relative path in the web.config file. This value is not in the connection string so I cannot use |DataDirectory| (I think), so what can I do? ...

ASP.NET MVC Preview 5 - Html.Image helper has moved namespace

We've just updated ASP.NET from Preview 3 to Preview 5 and we've run into a problem with the Html.Image HtmlHelper in our aspx pages. It seems that Html.Image has moved from System.Web.Mvc into Microsoft.Web.Mvc, and the only way we've found to access the helper now is to add an import statement to every .aspx page that uses it. All the...

HTTPHandler tag in Web.Config breaks asmx Files...

hey all, In my ASP.Net 1.1 application, i've added the following to my Web.Config (within the System.Web tag section): <httpHandlers> <add verb="*" path="*.bcn" type="Internet2008.Beacon.BeaconHandler, Internet2008" /> </httpHandlers> This works fine, and the HTTPHandler kicks in for files of type .bcn, and does its thing.. however...

ASP.NET/IIS: 404 for all file types

I set up 404 handler page in web.config, but it works ONLY when extension of URL is .aspx (or other which is handled by ASP.NET). I know I can setup static HTML page in website options, but I want to have a page. Is there any options to assign ASPX handler page for all request extensions in IIS? ...

Problem encrypting membership element in web.config

I am trying to encrypt the "system.web.membership" element within the Web.Config of our .Net application to secure username and password to Active Directory. I am using the aspnet_regiis command to encrypt, and have tried several different strings for the value of the "pe" option with no success. I have successfully encrypted the "connec...

What's the difference between a worker thread and an I/O thread?

Looking at the processmodel element in the Web.Config there are two attributes. maxWorkerThreads="25" maxIoThreads="25" What is the difference between worker threads and I/O threads? ...

Bare Minimum Configration for RESTful WCF

What is the bare minimum I need to put in web.config to get WCF working with REST? I have annotated my methods with [WebGet], but they are not getting the message. ...

How to initialize ConnectionStrings collection in NUnit

I want to test ASP.NET application using NUnit, but it seems WebConfigurationManager.ConnectionStrings collection is empty when running from NUnit GUI. Could you tell me how to initialize this collection (probably in [SetUp] function of [TestFixture])? Should I copy Web.config somethere? Thank you! ...

How can I set up a configuation file for .NET console applications?

Is it possible to use a ".net configuration" file for a .NET console application? I'm looking for an equivalent to web.config, but specifically for console applications... I can certainly roll my own, but If I can use .NET's built in configuration reader then I would like to do that...I really just need to store a connection string......

Log4Net "Could not find schema information" messages

I decided to use log4net as a logger for a new webservice project. Everything is working fine, but I get a lot of messages like the one below, for every log4net tag I am using in my web.config: Could not find schema information for the element 'log4net'... Below are the relevant parts of my web.config: <configSections> <se...

How to change SharePoint extended web application's web.config file

Hi! Using the SharePoint API, how can I modify an extended webapp web.config file? I have to do some changes in this file to specify the connection string, membershipprovider, etc... for using Forms Authentication. Currently, I can change the "master" webapplication web.config file, but not the extended one. Edited I'm using ...

MVC with SharePoint

Hi, We are looking to use the MVC Framework in our SP Application. This is what we are trying to accomplish... A virtual directory within the SPSite which can host and run MVC. for e.g., /_layouts/MVC/ Any hints on the required configuration changes (if at all this is possible) will be very helpful. Kind regards, Ashish Sharma ...

Storing values in the web.config - appSettings or configSection - which is more efficient?

I'm writing a page that can use a couple of different themes, and I'm going to store some information about each theme in the web.config. Is it more efficient to create a new sectionGroup and store everything together, or just put everything in appSettings? configSection solution <configSections> <sectionGroup name="SchedulerPage">...

Where is the official, extensive, complete documentation on web.config?

I'm trying to find about ALL the possible options that I can set in web.config. Surprisingly, I can't find this at all (i'm expecting it to be somewhere inside msdn.microsoft.com) I know I can technically add "anything" to web.config, what i'm looking for is the things that the .Net Framework "as shipped" uses. In particular, right now...

Is it possible to pass a App setting in the web.config to a Common C# class

Is it possible to pass a App setting "string" in the web.config to a Common C# class? ...

In my codebehind class, how do I retrieve the authorized roles?

I have the following in my web.config: <location path="RestrictedPage.aspx"> <system.web> <authorization> <allow roles="Group1Admin, Group3Admin, Group7Admin"/> <deny users="*"/> </authorization> </system.web> </location> Within RestrictedPage.aspx.cs, how do I retrieve the allowed roles collection that c...

Do these values belong in a config file or database?

There are multiple values I have been storing in ASP.NET configSections sections for each "module". I have been wondering if they even belong in these files at all. The background stands at: These are multiple instances of the web application deployed. All use the same database but have their own settings. I'm sure that differences bet...