Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Aug 15 '11 at 4:24

This question came from our site for professional and enthusiast programmers.

    
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 Aug 14 '11 at 20:14
add comment

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">
    <system.web>
        ...
    </system.web>   
</location>

What it does?

inheritInChildApplications

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?

share|improve this answer
    
Hi naveen, thanks a lot for your reply. So I've to change the web.config contained into subfolder, is it right? –  matan Aug 14 '11 at 18:28
    
no you have to specify that in your root we.config. please read the article caarefully –  yetanothercoder Aug 14 '11 at 18:29
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.