I need to publish my website into a subfolder of an existing one. Notice that there's no way to create a subdomain (e.g.: http://mynewwebsite.example.com), no way to access to IIS. At the moment I just tried to use the Publish command from my VS2010 and copy/paste file from my disk to subfolder domain via FTP. This is the error I get:

The file '/SUBFOLDERNAME/default.aspx' has not 
been pre-compiled, and cannot be requested.

Is there someone who can help me? Thank you in advance.

  • This is a fair enough question about publishing an app using a development tool. It's valid on both serverfault and SO because it stradles both site topics.
    – Kev
    Commented Aug 14, 2011 at 20:14

2 Answers 2


I would classify it as a serverfault question. But since you asked my two cents.

You could set this in your web.config

<location path="." inheritInChildApplications="false">

What it does?


Optional Boolean attribute.

Specifies whether configuration settings that are specific to a certain location (such as the root directory of a Web site) are inherited by applications that exist in subdirectories.

The default is True.

More Info: How to disable web.config Inheritance for Child Applications in Subfolders in ASP.NET?

  • Hi naveen, thanks a lot for your reply. So I've to change the web.config contained into subfolder, is it right?
    – matan
    Commented Aug 14, 2011 at 18:28
  • no you have to specify that in your root we.config. please read the article caarefully Commented Aug 14, 2011 at 18:29

no way to access to IIS

You must create an application (virtual directory) in IIS the first time you publish your application. If you can't access IIS directly, you can alter your web.config as suggested in another answer. But that only works with IIS 7.5 (Server 2008 R2) and later. If you're not running at least Server 2008 R2, you won't be able to do this without accessing IIS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.