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
4
votes
3 answers

Intermittent 401 and 302 Errors on Static Files

I'm developing a website for a client of ours and have been having a nagging issue for weeks. The problem is intermittent and might happen twice in a day or once in 2 weeks. When it happens, the client will start getting 401.3 "Unauthorized" errors…
4
votes
1 answer

Convert AddType rule from htaccess to web.config

I need to convert .htaccess AddType application/x-httpd-php .txt to web.config. Could you help me with it? I tried
Andrej
  • 77
  • 1
  • 6
4
votes
2 answers

Using web.config transform to conditionally update an element

I am trying to configure transformation rules for a web.config to create or update a connection string. The rules are simple: If a connection string with a given name ("MyDatabase") is present, it should not be touched. If there is no connection…
Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100
4
votes
1 answer

What is the equivalent of web.config for JavaScript code?

What is the equivalent of the .NET web.config for JavaScript code? I'm getting to grips with the use of the configuration details in the web.config file, but I don't know what (or even if) the configuration options are for JavaScript in the…
SteveC
  • 15,808
  • 23
  • 102
  • 173
4
votes
2 answers

use visual studio2010 web.config transforms after building the web application

I am using web.config transforms in Visual Studio 2010. I have added transforms by right clicking on the web.config file and selected option called Add Config Transforms. By this i have added few config files to my solution. After publishing my…
Mahi Kumar
  • 171
  • 1
  • 11
4
votes
3 answers

web.config error

i am trying to deploy my website to my host and get following error message on my web. config file: The configuration section 'connectionStrings' cannot be read because it is missing a section declaration at …
Silvia
4
votes
1 answer

How to setup web.config to see the complete error message for ASP.NET MVC3 project

How to setup web.config to see the complete error message for ASP .NET MVC3 project remotly? So I need a detailed error info... I have this under web.config but it seems doesn't work...
NoWar
  • 36,338
  • 80
  • 323
  • 498
4
votes
0 answers

Forms authentication - changing loginUrl at runtime

I have something like this in my web.config: However, I'm trying to implement some "fake" virtual directories…
Buchannon
  • 1,671
  • 16
  • 28
4
votes
1 answer

AD Groups with spaces used for roles authorization

I am trying to get roles Authorization working with an AD Group. However it appears that since it contains spaces it won't work. I have tried AD groups without spaces and they work fine.
raydenl
  • 397
  • 1
  • 4
  • 16
4
votes
1 answer

Asp.net Membership password

I am using sql server and custom database to store membership provider tables. In my webconfig file I decreased the password strength but members still needs to apply default password strength. The following is the webconfig settings
Hasan Zubairi
  • 1,037
  • 4
  • 23
  • 57
4
votes
2 answers

Web.Config Transform xml comments

How can I either select a comment or insert a comment using Web.config transforms? Nowhere can I find any information on this. I am trying to do either: 1) Insert a piece of xml ()…
Bitfiddler
  • 3,942
  • 7
  • 36
  • 51
4
votes
1 answer

How can I add a section to a web.config using PowerShell?

How can I add a section to system.serviceModel in a web.config, if it doesn't already exist? Before: After:
Sergei Shardiko
  • 115
  • 1
  • 3
  • 9
4
votes
1 answer

How to replace web.config with transformed for debug file when running WAP in Visual Studio?

I want to replace web.config with transformed for debug config file when running in Visual Studio( I am NOT interesting in publishing project to some output directory). I want to keep original web.config in the root of web application in TFS, but on…
Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
4
votes
1 answer

specifying MaxHttpCollectionKeys for a specific page?

I am wondering if there is a way to change this value for a particular page, instead of setting it for the entire project. We are running into the limit, but only for a couple pages. Our project is using .NET 3.5. For those who are unaware of what…
Itison
  • 236
  • 2
  • 11
4
votes
1 answer

Seemingly simple redirect in IIS using web.config file

I've restructured a WordPress site that's hosted on a Windows server, so I'm trying to redirect with a web.config file. I've tried dozens of variations from examples and I can't make it work. The new urls have changed from this:…
robin
  • 53
  • 2
  • 5