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

Session timeout asp.net iis7?

I know this is a common problem, but I've tried every suggestion I've found and none of them seems to work for me. I have a Windows Dedicated Server with a hosting provider. I have a Web site developed in asp.net. I want to increase the session…
Gonzalo
  • 982
  • 6
  • 23
  • 39
3
votes
2 answers

encrpyting web.config with command aspnet_regiis.exe

I have my web config as follows
Jorge
  • 17,896
  • 19
  • 80
  • 126
3
votes
4 answers

Why does my HTTP GET call to a subroute in react app gives a 404 NOT Found instead of HTML?

When I try to do a GET call to a subroute of my react application I get a 404. When I do this to my homepage it returns correctly the HTML. When just accessing the subroutes via the browser my webpage gets correctly rendered. I'm Using React version…
Jim Peeters
  • 2,573
  • 9
  • 31
  • 53
3
votes
1 answer

Can I add more than three web.config transformations?

Is it possible to add a fourth web.config transformation with Visual Studio? I have three transformations: But when I want to add one the option in contextual menu is disabled: (It is in French, it means "Add Configuration transformations")
bAN
  • 13,375
  • 16
  • 60
  • 93
3
votes
1 answer

Windows Authentication & MVC: proper way to exclude individual file/route

I have an MVC 3 site which is protected via Windows Authentication. However, there is a physical file at the root of the site, along with a controller action method (via a custom route), which need to be available without authenticating. What is the…
Jon
  • 4,925
  • 3
  • 28
  • 38
3
votes
1 answer

Web.config - ConnectionString property has not been initialized

I have a number of ASP.NET applications which run fine for months, then stop dead with the message: "....ConnectionString property has not been initialized". The application uses strongly typed datasets, with the connection string stored in the…
Tim Muir
  • 31
  • 1
3
votes
1 answer

Why does a nested ASP.NET 4.0 web.config occasionally cease to inherit?

Given a web application with the following structure: Main Site (/) web.config (root; appSetting="rootSetting") Applications (/Applications) App1 (/Applications/App1) web.config (app1; appSetting="app1Setting") Inside…
Jason
  • 4,897
  • 2
  • 33
  • 40
3
votes
1 answer

How do you protect a page using a web.config file?

Heey Stackoverflowers My question is: how do I protect a Page using web.config or Global.asax? Example: Direct url www.Yoururlhere.com/Account/Edit.aspx is currently accesible from url bar, but that is not what I want. I have a login page already…
3
votes
6 answers

App_Code and web.config

Let's say I have a class (MyClass.cs) in App_Code (using a ASP.NET web site, not project). There's no namespace assigned to the class. How can I get that class to be valid in the web site .aspx pages? WHAT do I need to put in the web.config file…
Robert4Real
  • 1,332
  • 5
  • 21
  • 39
3
votes
3 answers

detect web.config has been changed

I created an HTTPModule that should log reauests and responses. The parameters that tells the http module how to work located in the web.config. But, in order to let the http module work with the latest values of the parameters, each request I read…
Naor
  • 23,465
  • 48
  • 152
  • 268
3
votes
2 answers

How to properly set up ASP.NET web.config to show application specific, safe and user friendly asp.net error messages in edge cases

In our asp.net web page (.net 4.7.2) we use custom exception rendering logic which creates specific error pages for the user in global.asax.cs via: Application_Error(object sender, EventArgs e) This works fine. However there are some asp.net errors…
HCL
  • 36,053
  • 27
  • 163
  • 213
3
votes
2 answers

Error: XML transformation error in Azure Pipelines

I've spent the day trying to get to the bottom of an XML transformation error in Azure DevOps and I can't seem to get a handle on the problem. Locally the config transform works fine and the config transforms for the other environments that I'm…
3
votes
2 answers

What is the proper configuration for a WCF 4 REST service?

Sorry to post about this, but it's driving me nuts. I am using routes in the WCF4 REST template in VS2010. I set the maxreceivedmessagesize property to some gargantuan number, and it still gives me an HTTP status code 400 when I try to submit xml…
jdb1a1
  • 1,045
  • 1
  • 13
  • 32
3
votes
1 answer

Unable to access the website when Anonymous access is unchecked

I have simple webapp , which need to get the current logged on user name of the system. I tried with : Label1.Text = HttpContext.Current.User.Identity.Name.ToString(); But this was blank as Anonymous User access was checked. When I unchecked…
Simsons
  • 12,295
  • 42
  • 153
  • 269
3
votes
3 answers

ASP.NET: How to crash graciously using web.config setting?

Is there a way to display a benign error page (using some settings in web.config) when an asp.net app crashes ? I have an app whose database is updated regularly. If the database is updated while a user is using the app, frequently the app crashes.…
user776676
  • 4,265
  • 13
  • 58
  • 77