Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fred 2 posts 22 karma points
    Feb 25, 2011 @ 16:47
    Fred
    0

    The directory '/myapp/App_Code/' is not allowed because the application is precompiled.

    I have Umbracro version 4.5.2 for .NET 3.5 installed on Windows Server 2008. I can create templates and content and most things are working except when I add <umbraco:Item field="link" xslt="umbraco.library:NiceUrl({0})" runat="server" /> into a template. The template saves but viewing the content throws a HTTP 500 error. The Event Viewer has the following exception:

    Exception information:
        Exception type: HttpException
        Exception message: The directory '/myapp/App_Code/' is not allowed because the application is precompiled.

    Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
     
    I have taken an existing ASP.NET web application and put Umbraco into the same application in IIS. This application is precompiled and has a PrecompiledApp.config in the root. If I delete App_Code it is created automatically when vieing the content page. If I remove the
    xslt="umbraco.library:NiceUrl({0})" and delete App_Code again the content page displays.

    How can I fix this? I would like to be able to get a link to a content picker in the template. Currently the whole CMS is unusable (HTTP 500) as soon as I insert a reference to an xslt.

    Thanks for your time.

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Feb 28, 2011 @ 13:22
    Tim
    0

    Is Umbraco in a directory under the main app? If so, its probably picking up the setting from the parent app's config file, as they inherit down from folder to folder. You can stop the web.config files from inheriting, there's a basic example here: http://www.kowitz.net/archive/2007/05/16/stopping-asp.net-web.config-inheritance

  • Fred 2 posts 22 karma points
    Mar 03, 2011 @ 12:42
    Fred
    0

    No, they are in the same directory.

Please Sign in or register to post replies

Write your reply to:

Draft