Why we need web.config file ? [Resolved]

Posted by Akiii under ASP.NET on 6/9/2011 | Points: 10 | Views : 5485 | Status : [Member] | Replies : 11
Hi all,
Why we need web.config file if all the configuration details is found in machine.config file ?

Any help is appreciated

Thanks and Regards
Akiii




Responses

Posted by: Nithadeepak on: 6/10/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Settings in Machine.config apply machine-level defaults for your server.

For those settings that can be configured on an individual application basis, it is normal for the application to provide a Web.config file.

For more details refer...
http://msdn.microsoft.com/en-us/library/ff648667.aspx

Nitha Deepak

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nithadeepak on: 6/10/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Refer this...
http://dotnetkeeda.blogspot.com/2009/04/application-security-vulnerabilities-in.html

Nitha Deepak

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nithadeepak on: 6/13/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
The Web.config file for the Web site and other configuration files in ASP.NET applications automatically inherit the configuration handlers that are declared in the Machine.config file. There is no chance of machine.config to override web.config. For more details refer
http://msdn.microsoft.com/en-us/library/w7w4sb0w.aspx
http://www.dotnetfunda.com/articles/article854-a-beginners-view-webconfig-.aspx

Nitha Deepak

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ndebata on: 6/10/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
You need web.config to have settings that will only apply for that particular application.
in case of machine.config, it will apply to all setting (All application running) in your system.
Which in some scenario you may not want.
Some are like you want one of application to be cookieless or to use a different session or lets say different timeout periods for different sites.


Thanks,
Debata

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/10/2011 [Member] Bronze | Points: 25

Up
0
Down
hi narayan...

thanks for the explanation......but do machine.config file override the web.config file in any case ?

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/10/2011 [Member] Bronze | Points: 25

Up
0
Down
hi nitha....
thanks for the links...

Is the web.config file vulnerable to any type of attack because it may happen that my website is hosted in a shared domain ?

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/13/2011 [Member] Bronze | Points: 25

Up
0
Down
thanks nitha for the link....

its always better to store the username and password encrypted in a database......

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 6/13/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi Akiii,

Refer this link,

http://msdn.microsoft.com/en-us/library/ms460914.aspx

Regards,
Susan

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 6/13/2011 [Member] Bronze | Points: 25

Up
0
Down
hi susan.....for the explanation..

the second link is very nice...

thanks and regards
Akiii



Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 6/23/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Thank u Akiiiii

Regards,
Susan

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: harishsdhage-13224 on: 1/3/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

If we can delete web.config file from project/website then also application runs. Then why it is so important. Please reply to my id harish.s.dhage@gmail.com

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response