Questions tagged [web-config]

web.config is an XML file that stores the main settings and configuration files for an IIS server.

Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application, as detailed in Microsoft's IIS Settings Locations. The web.config file contains information that controls module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings.

It is also important to note that making a change to the web.config file, or simply touching it (updating last modified date), will cause a restart of the IIS app pool.

example:

<?xml version="0.10.4"?>
<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
       <customErrors mode="Off" />
    </system.web>
</configuration>

Links:

8663 questions
3
votes
1 answer

How to config AntiXSS with .Net 3.5?

Hi I am using Ajax HtmlEditorExtender for my one of TextBox. It is strongly recommended to use the AntiXSS Sanitizer. Following is what I added in my web.config.
GLP
  • 3,441
  • 20
  • 59
  • 91
3
votes
2 answers

AppHarbor - Why is my not working?

I have a long querystring value I need to pass in (itself a questionable practice, I understand), and I am not able to get it to take effect on my Appharbor app instance. Locally, I've made this change to my web.config and confirmed that the URL in…
TimDog
  • 8,758
  • 5
  • 41
  • 50
3
votes
1 answer

Rewriting URLs in IIS7

I have been following http://learn.iis.net/page.aspx/806/seo-rule-templates/, which is a nearly perfect guide to creating SEO friendly URLs in IIS7. I have one problem though: If I create a rule to rewrite www.domain.com/contact/ I get in…
MicBehrens
  • 1,780
  • 8
  • 34
  • 57
3
votes
4 answers

ASP .NET MVC 3. Session expired too quickly

I have a page (View), which sends AJAX queries in some intervals. User can work with this page very long time. But session expired in about 40-60 minutes. So AJAX-requests don't return usefull information. My Web.config
Sir Hally
  • 2,318
  • 3
  • 31
  • 48
3
votes
1 answer

How do I select/enforce AES encryption with aspnet_regiis to encrypt web.config values?

I need to encrypt part of our web.config for our ASP.Net 4.0 project, but we are required to use AES and the default appears to be Triple DES. How can I tell it to use AES encryption instead? In the command prompt I do the following…
user358089
3
votes
0 answers

IIS7 Output Caching - only lives in cache for 60 seconds?

I'm trying to cache the JSON output of an HTTP Handler (NOT an ASP.NET page, so the Page-level OutputCache directive does not apply). I'm running IIS 7.5 on Windows Server 2008. I've added lines to the Web.config to enable caching in user mode (not…
3
votes
6 answers

Lightweight editor for web.config files

I'm looking for a lightweight text editor for web.config files which has colour syntax highlighting (like in visual studio). Any suggestions?
Matthew Dresser
  • 11,273
  • 11
  • 76
  • 120
3
votes
2 answers

How to avoid replicating configuration settings from web.config in unit tests

I have a web project which reads multiple configuration keys from web.config. These settings are related to the rules implemented in the project. When the unit test invokes the model classes in the web project it ends up reading the app.config from…
Amol
  • 31
  • 1
3
votes
2 answers

web.config related error - Sections must only appear once per config file

ive just installed and im trying to get MVCMailer to work. i get an error stating " Sections must only appear once per config file. See the help topic for exceptions." i understand the basics that it means i should only have 1 pages tag (i guess…
loveforfire33
  • 1,090
  • 3
  • 25
  • 46
3
votes
1 answer

Encrypting custom configuration settings

I'm having some troubles encrypting a configuration section. We use a package from an external supplier and the web.config is structured in the following way: web.config
basvo
  • 737
  • 1
  • 4
  • 12
3
votes
3 answers

user IIS7 uses when identify impersonate= true and a specific user is not specified

If I have the following line in my web.config file... And the IIS7 site is set to use anonymous authentication (Notice I am not specifying a specifc user in the web config) What user will IIS7 use to service the…
user772110
  • 411
  • 4
  • 11
3
votes
1 answer

DotNetOpenAuth and Windows Azure with MVC3 Web Role

I have created a cloud project with an MVC3 webrole (empty project, added homecontroller and view). When I debug(F5) it runs smoothly. After installing DotNetOpenAuth 3.4.7.11121 via NuGet I get the following error: Windows Azure Tools for…
Simen eriksen
  • 425
  • 3
  • 12
3
votes
1 answer

"The specified node was not found in the web.config file" - error when trying to add a module programmatically

I try to add a module into the web.config from within an event-receiver. I use SPWebConfigModification for this. When I Update the webApp (webApp.Update()) the following error is thrown: The specified node "configuration/system.webserver/modules"…
Ole Albers
  • 8,715
  • 10
  • 73
  • 166
3
votes
3 answers

Login form using Active directory groups in ASP.NET 2

Sorry if this has been asked before, but I have searched both Google and this site and can't find a complete work through aimed at beginners. I am trying to write a login page that authenticates against active directory groups using ASP.NET 2. I…
nigelhooper
  • 39
  • 2
  • 6
3
votes
1 answer

ASP.NET MVC3, How to Use Different OutputCacheProfile to Different User Role?

I know I can setup OutputCacheProfiles at web.config file. I like to know how to apply different cache profile to different user role on page (controller) level?
Eric Yin
  • 8,737
  • 19
  • 77
  • 118