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
2 answers

How to diagnose WCF Request errors if I don't have a "" node in my Web.Config?

Seeing the dreaded Request Error page while testing your WCF Web Service? Well, worry not, because this StackOverflow answer shows you how to turn on detailed error display: WCF Data Service - How To Diagnose Request Error? But ... hang on, we…
hawbsl
  • 15,313
  • 25
  • 73
  • 114
4
votes
1 answer

Consuming WCF with Delphi - Maximum string content length quota (8192) error

I have a WCF that is being consumed by a Delphi app. Sometimes I get this error when sending a large request to the server: --------------------------- Debugger Exception Notification --------------------------- Project Project43.exe raised…
Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121
4
votes
1 answer

Read web.config on FeatureActivated event while activating Feature using PowerShell

On FeatureActivated event(WebApplication scoped) I want to read the web.config to get from there a connection string. I use the following code to open the web.config: Configuration rootWebConfig = WebConfigurationManager.OpenWebConfiguration("/",…
zavaz
  • 745
  • 4
  • 13
4
votes
2 answers

web.config inheritInChildApplications="false" for configSections?

I have a .NET 4.0 application on IIS 7 that contains a nested .NET 2.0 application. The problem is that the the nested .NET 2.0 application has the system.web.extensions sectionGroup within the of the web.config and the .NET 4.0…
Jason Eades
  • 1,547
  • 5
  • 16
  • 31
4
votes
1 answer

How to put system.serviceModel into ServiceConfiguration.cscfg (Windows Azure)

I have following code (for Microsoft Translator)
Eric Yin
  • 8,737
  • 19
  • 77
  • 118
4
votes
1 answer

WCF - Cannot obtain Metadata, but works when the XML Endpoint is removed?

I'm having a problem with the WCF Test Client. I cannot connect to my WebService because it keeps hitting this error: Error: Cannot obtain Metadata from http://xxx.xxxxxxxx.xxx/DPITerminal.svc If this is a Windows (R) Communication Foundation…
GaiusSensei
  • 1,860
  • 4
  • 25
  • 44
4
votes
2 answers

Is encrypting web.config pointless?

I was reading a blog today (http://somewebguy.wordpress.com/2009/07/20/is-encrypting-your-web-config-a-waste-of-time/) about both how to encrypt your appsettings/connectionstrings etc. using the aspnet_regiis tool. He has a follow up post with some…
Kieran Benton
  • 8,739
  • 12
  • 53
  • 77
4
votes
2 answers

(ASP.NET) Can you do a String.Format on a web.config key/value?

This might be a god awful question but I'm not sure why it won't let me do this. I have a URL I need to store in Web.config, which has a dynamic parameter pulled from the web page. So I want to store:
Jack Marchetti
  • 15,536
  • 14
  • 81
  • 117
4
votes
1 answer

Kind of #if (Debug Symbol) but for web.config file

I would like to use different section for debug and release configuration. tried to use "web.config transform" functionality but it works great only for deploying. and not when i just want to build and execute the application locally. can i add a…
Omtechguy
  • 3,321
  • 7
  • 37
  • 71
4
votes
2 answers

The configuration section 'appSettings' cannot be read because it is missing a section declaration

I Was clearing ASP.NET Temporary Internet files and I accidentally deleted some .NET Framework files (I have 3.0, 3.5, 4.0 and 4.5) then neither Visual Studio 10 or Visual Studio 2012 was opening. I repaired the installation of all the .Net…
Khodor
  • 996
  • 1
  • 6
  • 13
4
votes
1 answer

User.Identity.IsAuthenticated always True

Could someone tell me how to handle the authentication mode @asp.net mvc 3 ? My webconfig has no entry for the tag authentication bcause i dont know which mode is suiteable! refering to the title: i'd like to hide some navigations buttons @View, and…
davee
  • 156
  • 1
  • 10
4
votes
2 answers

Change Custom Error Mode in Web Config Programmatically in ASP.NET MVC 3

How can I change the Custom error mode in web.config file programmatically? I need to change the following: ... ....
user1479279
4
votes
2 answers

How do you manage web.config files in different projects within same solution when you need shared rules?

In my solution, I have 2 projects, call them Foo and Bar. When deployed, Foo is the root site (http://mycompany.com) and Bar is a sub-directory (http://mycompany.com/sub). When I work on them locally in IIS Express on my local machine, I need to…
TMC
  • 8,088
  • 12
  • 53
  • 72
4
votes
1 answer

Error on trying to configure RavenDB in IIS mode

Following the steps in this tutorial, the first item of "Setting up with IIS 7.5" after clicking on "Modules" in inetmgr, the following error occurs: Full image: https://i.stack.imgur.com/QCM4s.png Web.config in RavenDB
ridermansb
  • 10,779
  • 24
  • 115
  • 226
4
votes
1 answer

Autofac Losing Registrations on Web.Config Edit

I have a layered web application that I built with ASP.NET MVC 4, WebAPI and some other components. I'm using the latest release of Autofac 2.6.2.859 as my DI container along with the MVC and WebAPI integrations. I have autofac modules setup in my…
cecilphillip
  • 11,446
  • 4
  • 36
  • 40