Suppose you have created folder under C:\inetpub\..\80 .It's having user control files & images .If you try to access the user control or images in sharepoint site ,then you will get the above error. bcoz the folder is not mapped to IIS.
To fix the issue .Pls do the following steps
2.Under websites folder->Your website->Select the folder->Right click ->Properties->Directory Tab
3.Click the Create button (It is visible if application is not created,otherwise you can see the "Remove" button - It means Application already created for this folder)
4.Select the URL name (where the application is used).
5.Reset the IIS