I have developed an Asp.net website and I am able to access it from my browser and also in LAN. Now I tried to publish the website and place the published website in my virtual directory and access it from my browser. This gives me an error.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request.
Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
This error can be caused by a virtual directory not being configured as an application in IIS.
To my knowledge if the site is published , then when I give the URL upto the directory containing the site’s files, then automatically the Default.aspx file should be opened, but I get the directory listing instead. If I open the Default.aspx from there, I get the error.
So please let me know why am I getting the error when I am accessing through the published site and also what’s the difference in accessing the site being published or unpublished?
Update: My IIS screen shot:

If you are using Windows server 2003 , You have to add “Default.aspx” to Default page list by right click on your site and then go to documents
To resolve your error right click on your site and then go to directory security and uncheck integrated windows authentication .
do not forget to run IISReset command