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

Problem with Google Apps email/smtp to send mails from website

I have an Asp.Net site which uses google SMTP to send emails.. its working fine with normal gmail accounts using the below configuration
Ansar Muhammad
  • 1,238
  • 5
  • 25
  • 45
3
votes
3 answers

Disable web authentification in asp .net

I use ASP .Net 4 and I have a project using the form web authentication I have a web service in the same project and I want to disable this web authentication…
P. Sohm
  • 2,842
  • 2
  • 44
  • 77
3
votes
2 answers

configuring asp.net web.config session

I'm trying to increase the Session timeout without modifying code. Does sessionState time in web.config override the default 20 minute IIS session time? Thank you.
Nil Pun
  • 17,035
  • 39
  • 172
  • 294
3
votes
1 answer

Should I leave in release web.config?

also this line was added automatically by Visual Studio: Should I turn it to debug="false" in the release web.config? Many thanks.
user776676
  • 4,265
  • 13
  • 58
  • 77
3
votes
3 answers

How I can write in appSetting in web.config file using ASP.NET?

I can easily read my appSetting in web.config file and then fill all keys and values in asp.net form. but I need to have initial setup for my web application how I can write in appSetting ? Is it the best way or not I have to store all of the keys…
kamiar3001
  • 2,646
  • 4
  • 42
  • 78
3
votes
2 answers

Roles authentication is not working in asp.net

I am using the code below to access a page base based upon user authentication if (user.FirstOrDefault() == HashedPassword) { string roles = "Member"; // Create the authentication ticket FormsAuthenticationTicket authTicket = new …
3
votes
2 answers

Using web.debug.config/web.release.config in a Website project?

I have been reading about web.config transformation feature of VS2010 (web.debug.config/web.release.config), and all of them talk about WebApplication projects. What about WebSite projects? Can I use these transformations in a WebSite, or only in a…
Miguel Angelo
  • 23,796
  • 16
  • 59
  • 82
3
votes
2 answers

Redirecting nonexistant pages with query strings using web.config

I'm working on a website in aspx where a user can go to a url similar to "www.website.com/referralname" or "www.website.com/otherreferralname" and will be redirected to www.website.com/genericform.aspx?referral=referralname I'm not the original…
Christine
  • 59
  • 7
3
votes
3 answers

How to read connection string in ASP .NET Core Razor Pages

I can't wrap my head around how to retrieve connection strings in ASP .NET Core. I've spent two days trying all the different things and can't get it to work. I have tried the following methods: Using ConfigurationManager.AppSettings a Count…
Dawid Kubiak
  • 57
  • 1
  • 7
3
votes
2 answers

Setting SameSite=None and Secure in ASP.NET

Read about the SameSite changes enforced to prevent Cross-Site Forgery. Source: https://blog.chromium.org/2019/10/developers-get-ready-for-new.html I'm trying to set its value to "None" and use Secure as advertised. My current web.config setting is…
3
votes
0 answers

How To Solve IIS Giving HTTP Error 500.19?

I have website which I am trying to run through IIS. But on browsing the website it shows error saying HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is…
redcaper71
  • 287
  • 3
  • 6
  • 13
3
votes
2 answers

What is the node in the web.config?

Ours looks like this:
oscilatingcretin
  • 10,457
  • 39
  • 119
  • 206
3
votes
5 answers

Configure web.config dotnet IIS

I'm developing a dotnet application followed the passage of the reference and locally on Ubuntu it's all ok, however now I try to publish to my windows server and when access to route configurable them myself from the following error: In the…
Marcius Leandro
  • 775
  • 1
  • 11
  • 34
3
votes
3 answers

ASP.NET - Deployment Issues - Enabling Stack Trace / Trace Listener Log via the Web.Config to find the cause of Internal Server 500 Error

I am getting a Internal Server 500 error after deploying an application that has compiled without errors on my local machine. The server that the application is deployed on has a ton of security so I need to specify read and write access for every…
3
votes
1 answer

Reading & Editing configuration inside Web.config

I have a few settings that need to be edited from the admin panel of the site I'm currently working on. I thought it makes sense to place those settings inside the web.config (or should I place them somewhere else?). So anyway, I'm trying to write…
Kassem
  • 8,116
  • 17
  • 75
  • 116