Can an ASP.NET web app run without web.config

asp.netweb.config

Can my asp.net web application run without a web.config?
For argument's sake lets say that I'm not connecting to a Database or explicitly reading any
configuration information .
I have tried it out and I'm able to run a web app successfully in VS 2008 without a web.config.

This brings me to the question as to how are authentication and session modes configured now ?
The machine.config and the root web.config files ( in the framework folder) do not have any authentication/session modes configured explicitly .

Any ideas ?

Thanks.

Best Answer

yes we can run asp.net application without web.config file,if u r not configure any settings in web.config file then it will take machine.config file for default configurtaons.This config file will automatically installed when your application getting executed.

Because all the configuration settings will be available under MACHINE.CONFIG file by default these settings will be applied to all asp.net applications.