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

IIS virtual directory from web.config

I have a IIS problem that I think this blog gives me a fix for: To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will automatically create the…
BCS
  • 75,627
  • 68
  • 187
  • 294
3
votes
1 answer

Setting validationKey at server vs. site vs. app level

Our production environment has three load-balanced servers. On each server, there are nine sites in IIS. In each site, there are between 1 and 15 different apps. To maintain proper encryption/decryption across all three servers, the same…
mattsmith321
  • 6,793
  • 5
  • 28
  • 18
3
votes
2 answers

Encrypt and store password in web.config file

I have the following information in my web.config file. how do I encrypt it and store? how do I decrypt and use?
vml19
  • 3,816
  • 11
  • 45
  • 63
3
votes
0 answers

.NET Framework 4.8 UserSecretsConfigBuilder "Expand" (v2.0) and "Token" (v3.0) modes don't replace all tokens

I am using Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder and trying to update tokens in my web.config file. Documentation mentions that mode="Expand" (update: and now mode="Token" in v3.0) in the builders config should…
codeMonkey
  • 4,134
  • 2
  • 31
  • 50
3
votes
1 answer

Windows Auth directory in IIS - web.config Permission problem

We've created a windows authenticated sub directory on our web server, however, intermittently when we go there (once logged in as an authenticated user - member of a authenticated group) we get the following error: Module IIS Web Core Notification…
Stuart Palmer
  • 191
  • 1
  • 1
  • 11
3
votes
0 answers

How could to check params from url in web.config

I want to divide result of this url www.test.com/shop/?wc-ajax=update_order_review With any other url like: www.test.com/shop/?param=update_order_review www.test.com/shop// www.test.com/shop And what I looking, result of other Url redirect to…
3
votes
1 answer

Managing a maintainance page redirect in an ASP.NET application

I would like to use a configuration in the .config file like this: So that, when the setting is set to the…
Andry
  • 16,172
  • 27
  • 138
  • 246
3
votes
1 answer

How to get a value in web.config of an ASP.NET MVC area?

Possible Duplicate: does mvc support inheritance of Web.config settings throughout areas? In ASP.NET MVC 3, I can get the appsetting value in the root web.config, but how can I get the value in web.config which is in area?
cocc
  • 33
  • 1
  • 4
3
votes
3 answers

Web Config error in IIS

I have an ASP.NET Web Application which is working properly in localhost. But when hosted in IIS the following error message displays: Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The…
Nithesh Narayanan
  • 11,481
  • 34
  • 98
  • 138
3
votes
0 answers

ARRAffinity Cookie How to Set SameSite Attribute

I had security vulnerability popped up for one of the websites. vulnerability is Insecure Cookie Configuration - SameSite Flag. After trying and analysing solutions i saw that only ARRAffinity is having Samesite attribute not set. I found the…
3
votes
2 answers

Set location of DLLs to load in web.config

Is it possible within the web.config to set the local file path location of specific DLLs to load rather than having those DLL in the GAC or C:\Windows\System32. This would make it much easier to deploy the web service, without having to mess…
tgandrews
  • 12,349
  • 15
  • 43
  • 55
3
votes
1 answer

After converting MVC 2 to MVC 3 I am getting the: Could not load type 'System.Web.Mvc.ViewTypeParserFilter'

I used Mvc3AppConverter and converted MVC2 to MVC3 and after getting the compilation error of Tag-builder I added the System.Web.WebPages reference, but now I am getting the following web config error : Parser Error Message: Could not load type…
Akbar Admg
  • 437
  • 1
  • 8
  • 16
3
votes
1 answer

Sql server express and connection string in web.config

i have connection string stored in web.config file but it is giving me the error.
Mou
  • 15,673
  • 43
  • 156
  • 275
3
votes
2 answers

Different authentication mechanism for different pages

I'm working with an ASP.NET application that is currently used only from intranet. The authentication mode for it is integrated Windows security. I now have a requirement that a part of the system should be visible externally with Forms based…
Michał Drozdowicz
  • 1,232
  • 11
  • 30
3
votes
4 answers

asp.net managing multiple web.config files

Can anyone suggest a good way to manage multiple web.config files? For example, I have a development web.config I use on my localmachine named "localWeb.config" and then one I use for production called "prodWeb.config". I keep the .config extensions…
codette
  • 12,343
  • 9
  • 37
  • 38