Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens when I edit web.config?

I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors).

Will this cause the IIS6 worker process to recycle?

Will active users lose their session state because of this?

Or can I safely edit the file?

like image 441
willem Avatar asked Oct 07 '08 13:10

willem


People also ask

What happens when you change the web config file at run time?

the answer i found :- ASP.NET invalidates the existing cache and assembles a new cache. Then ASP.NET automatically restarts the application to apply the changes.

Why would you need to edit the web config file of the instance?

There are several reasons for this. Here is a couple of them: when you change the web. config, the application pool will be recycled, means your web-application will just re-run. All you have in session (stored in memory by default) will be vanished.

What is Web config used for?

A web. config file is a Windows file that lets you customize the way your site or a specific directory on your site behaves. For example, if you place a web. config file in your root directory, it will affect your entire site (www.coolexample.com).

What happens if I delete web config?

config, unlike any other file, can be deleted.. Yes the web. config could be removed you can test it. The Website will give you error once you have removed it.


2 Answers

The application pool will restart and session state will be lost. Imagine each ASP.NET application (as defined in IIS) is a program on the desktop. Saving web.config will do something similar to closing the program and reopening it.

like image 94
Dan Goldstein Avatar answered Oct 07 '22 04:10

Dan Goldstein


  1. Yes. It will be recycled.
  2. Yes. They will lose their session.
  3. Yes. You can safely edit the file. I suggest you to read this MSDN article : Working with web.config Files in Windows SharePoint Services
like image 30
Pascal Paradis Avatar answered Oct 07 '22 03:10

Pascal Paradis