ASP.NET error: current folder needs to run as an application

If you have your bin folder and web.config file in a subfolder, and when trying to run your ASP.NET application the following error occurs:

The current folder needs to run as an application

In IIS you have the root folder of your site set to run scripts as an application, so moving the BIN folder and web.config file to the root should resolve the error. If you dont want to do this, you can simply create an application from the subfolder. To do this:

  1. Find the site in IIS and expand it to show subdirectories.
  2. Right-Click on the directory that the you want to run as an application, and select Properties.
  3. Click on the CREATE button on the Directory tab. Click ok and you're done!