Copied to clipboard

Flag this post as spam?

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


  • Jay 49 posts 211 karma points
    Feb 09, 2015 @ 15:52
    Jay
    0

    Site In Sub Directory Of Umbraco 7.2.1 Installation On IIS

    Dear Support,

    My Umbraco site needs to iframe another site on a client's production machine.

    There is only a single domain available for me to install my software to. So rather than installing the to-be-iframed site to another domain, I would like to install it to a sub directory of Umbraco instead.

    How can I override Umbraco's url routing for a single, specified url?

    I have tried to add a 'virtualfolder' folder in my IIS. I converted it to an application. The folder that it points to, contains an index.html file for testing purposes.

    When I visit my virtual folder, I get a web.config error:

    Server Error in '/virtualfolder' Application.
    
    Configuration Error
    
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    
    Parser Error Message: Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    
    Source Error: 
    
    
    Line 116:           <assemblies>
    Line 117:               <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    Line 118:               <add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    Line 119:           </assemblies>
    Line 120:           <buildProviders>
    
    Source File: C:\www\Umbraco.PGGM\Debug\web.config    Line: 118 
    

    Any support would be greatly appreciated.

  • Jay 49 posts 211 karma points
    Feb 09, 2015 @ 16:12
    Jay
    0

    I have figured out how to successfully access a sub folder. I'm doing it my placing my system.web and system.webserver sections in the web config in location tags like so:

    <location path="." inheritInChildApplications="false">
      <!-- system.web -->
    </location>
    
    <location path="." inheritInChildApplications="false">
      <!-- system.webServer -->
    </location>
    

    The problem is that this breaks my /umbraco/ folder, effectively shutting me out of my own installation. Visiting the /umbraco/ url now gives me:

    HTTP Error 500.22 - Internal Server Error
    An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
    
    Most likely causes:
    This application defines configuration in the system.web/httpModules section.
    

    Suggestions welcome.

  • Jay 49 posts 211 karma points
    Feb 10, 2015 @ 10:01
    Jay
    100

    I just found umbracoReservedPaths in the web.config.

    Works like a charm. Problem solved.

  • Jay 49 posts 211 karma points
    Feb 10, 2015 @ 14:53
    Jay
    0

    This solution (using inheritInChildApplication="false" around web.config sections) makes the sub site work, but it breaks the /umbraco/ url.

    I have to switch to IIS classic mode in order to solve this, which kinda sucks.

    The IIS error (which I posted previously) tells me to switch to classic, along with another option: migrating the settings so they are configured to be compatible with Integrated mode, rather than classic mode. Doing this migration basically comes down to transferring settings from system.web to system.webserver.

    You can do this migration with appcmd, apparently. I haven't been able to pull it off yet.

    But would it not be easier if Umbraco came with config settings that are compatible with Integrated mode right out of the box?

  • Jay 49 posts 211 karma points
    Feb 10, 2015 @ 15:01
    Jay
    0

    Alright, I pulled it off.

    Check this link to migrate your own site's config if you ever run into this.

    You also need to remove the HttpModules section from the system.web section once they have been migrated to the system.webserver section, or you will still get the error.

    The end result of all this effort is that Umbraco can run in Integrated mode with a child application in a virtual app directory.

  • Jay 49 posts 211 karma points
    Feb 10, 2015 @ 15:28
    Jay
    0

    Upon further investigation, it seems that Umbraco already has defined its modules in the system.webserver section.

    The migration processes only added this line to system.webserver/modules:

    <add name="DependencyHandler.axd_*" path="DependencyHandler.axd" verb="*" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " preCondition="integratedMode,runtimeVersionv2.0" />
    
Please Sign in or register to post replies

Write your reply to:

Draft