I tried setting up a virtual folder on IIS7.0 on windows 2008 server. when trying to browse the aspx pages, i received an error like "HTTP Error 500.19 - Internal Server Error" and had few more lines saying the config file is incorrect.
Few google results pointed to applicationHost.config file might be incorrect.
just by trial and error I checked up the space in the server and found its just having 1MB free space.
SO freed up 1 GB space and then the error was gone
My question: whenever a website is accessed first time in IIS7.0 does it try to update applicationHost file?
what is the role of applicationHost in IIS7.0
The 500.19 error is indeed caused by errors in configuration files but not necessarily applicationHost.config, it can also be caused by errors in the web.config file for the application or any web.config file that applies to the application/virtual folder/site
Link to MS Support article about this error - http://support.microsoft.com/kb/942055
The following link is to an article that introduces the applicationHost.config file - http://learn.iis.net/page.aspx/128/iis-7-configuration-reference/
If you read it you'll see that the main role of the file is to configure the general setup of the web server and control what configuration can be overridden in web.config files. It also tells IIS all the Sites, Virtual Folders and Applications that are running on it.
Given that your web server has a measly 1MB free space (how did you get that low without the entire machine crashing!!??) I would suspect that IIS 7 may do something with the file and was unable to update it on disk correctly due to the lack of space leading to the corrupted configuration.