1

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.

1
  • 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, 2011 at 20:14

2 Answers 2

1

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?

2
  • 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, 2011 at 18:28
  • no you have to specify that in your root we.config. please read the article caarefully
    – naveen
    Aug 14, 2011 at 18:29
1

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 that you have read and understand our privacy policy and code of conduct.