Copied to clipboard

Flag this post as spam?

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


  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 15:57
    Mike Larsen
    0

    URGENT: Umbraco not playing well with application in subdirectory

    I have an application in a subdirectory (I will call XXX) of my umbraco site, and umbraco isn't playing nice with it. No matter what I do to umbraco to try to fix the situation, either my XXX application doesn't work or all images from the /media folder stop working.

    I've tried nearly every suggestion online, and nothing works.

    • Adding entries to umbracoReservedUrls doesn't work
    • Adding entries to umbracoReservedPaths doesn't work
    • Wrapping the system.web and system.webserver with <location path="." inheritInChildApplications="false"> doesn't work
    • Changing app pool settings from classic to integrated, or integrated to classic doesn't work

    I'm at my wits end. This project is set to be released in less than two weeks, and this was an issue I never expected. All I need umbraco to do is to TOTALLY IGNORE my /XXX directory so it plays well with my app. I didn't think to test this earlier as I thought a professional CMS such as umbraco wouldn't have such a terrible bug.

    I need to get this resolved ASAP. How can I force umbraco to ignore my /XXX directory so my app works?

    Here are a few links with suggestions I've tried that did not work:

    Please help!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 19:01
    Jan Skovgaard
    1

    Hi Mike

    Can you please show some examples on how you setup the entry in "umbracoReservedPaths" - I would like to see the exact line and how you did it.

    Also what version of Umbraco are you running? And what kind of app do you have in your subfolder?

    No need to panic just yet I think - I have setup many subsites, which Umbraco should ignore without any issues in the past so I would be surprised if we can't figure out to make it work in your scenario too. I think it's a bit to early to claim that it's a bug at least. Let's see if we can nail it but please do provide the specific information since it will make it much easier to help you out.

    Looking forward to hearing from you.

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 19:14
    Mike Larsen
    0

    Can you please show some examples on how you setup the entry in "umbracoReservedPaths" - I would like to see the exact line and how you did it.

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd, ~/XXX" />
    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/XXX" />
    

    I have tried every combination of ~/XXX, ~/XXX, /XXX, /XXX on both lines without success.


    Also what version of Umbraco are you running?

    Tried on both of these versions:

    • Umbraco version 7.7.7 assembly: 1.0.6554.23584
    • Umbraco version 7.10.4 assembly: 1.0.6684.15725

    And what kind of app do you have in your subfolder?

    It's an ASP.NET 2.0 WebForms / ASP site running in it's own app pool set to .NET CLR v2.0.50727

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 19:35
    Jan Skovgaard
    0

    Since you're adding an entire dictionary with your app you don't need to add anything to the "umbracoReservedUrls" setting since it's only meant for file paths to be left alone by Umbraco for the IIS to handle as mentioned in the documentation here https://our.umbraco.org/documentation/reference/config/webconfig/#umbracoreservedurls - But that's probably not enough to fix your issue. Just want to let you know that you should not need to care about this line at least.

    I have an application in a subdirectory (I will call XXX) of my umbraco site, and umbraco isn't playing nice with it. No matter what I do to umbraco to try to fix the situation, either my XXX application doesn't work or all images from the /media folder stop working.

    You start you initial post saying that either your XXX application does not work or the /media folder stops working.

    I'm wondering...does that mean that you have actually found a combination that makes your custom app work but then somehow make umbraco media not work? If so what settings made this happen?

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 19:53
    Mike Larsen
    0

    I'm wondering...does that mean that you have actually found a combination that makes your custom app work but then somehow make umbraco media not work? If so what settings made this happen?

    That is correct. When I wrap the system.web and system.webserver settings in the umbraco web.config with <location path="." inheritInChildApplications="false">, the XXX app and umbraco work, but items in the /media folder don't appear.

    When I try to view an image directly, say http://www.mysite.com /media/1046/dreamstimexl46724414.jpg the following error is displayed:

    HTTP Error 500.22 - Internal Server Error
    An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
    

    So, if I change the app pool to Classic, the image displays correctly, but when I visit the umbraco site, I get the following error:

    Server Error in '/' Application.
    This operation requires IIS integrated pipeline mode.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace: 
    
    
    [PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
       System.Web.HttpResponse.get_Headers() +11969696
       Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +536
       Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +347
       Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +19
       Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +392
       System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +623
       System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0
    

    It's a cat and mouse game that I'm losing! Every setting I modify fixes one thing, and breaks 5 other things!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 20:12
    Jan Skovgaard
    0

    Ok, so when you mentioned an app in the first place I was thinking something like a SPA based on a javascript framework. This is usually not a problem to get working by simply adding the folder to the umbracoReservedPaths setting - It will just work. I did not think in terms of .net web applications (I'm a frontend developer) So sorry about that confusion! That's my bad.

    Hmm, I'm wondering if the web.config file in the /media folder could be the issue? I'm no expert in how the inheritance stuff works but I suspect that the web.config in the /media folder somehow also needs to be dealt with?

    Also in the setup that nearly works - Where the media does not show do you then run both Umbraco and your custom app in integrated pipeline mode?

    And is it safe to assume that currently you're working locally - I mean no Umbraco Cloud or Azure hosting currently, right?

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 20:23
    Mike Larsen
    0

    Also in the setup that nearly works - Where the media does not show do you then run both Umbraco and your custom app in integrated pipeline mode?

    Umbraco runs on integrated and my XXX app can run on either integrated or classic.

    And is it safe to assume that currently you're working locally - I mean no Umbraco Cloud or Azure hosting currently, right?

    Correct, locally.

    Hmm, I'm wondering if the web.config file in the /media folder could be the issue? I'm no expert in how the inheritance stuff works but I suspect that the web.config in the /media folder somehow also needs to be dealt with?

    That's a possibility... however, I forgot to mention with the <location ...> wrapping, the actual umbraco administration section of http://www.mysite.com/umbraco does not work either. I get the same error message:

    HTTP Error 500.22 - Internal Server Error
    An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
    

    I appreciate all of your help, btw.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 20:42
    Jan Skovgaard
    0

    That is correct. When I wrap the system.web and system.webserver settings in the umbraco web.config with <location path="." inheritInChildApplications="false">, the XXX app and umbraco work, but items in the /media folder don't appear.

    I'm wondering - Have you tried placing this line in the web.config of your custom app instead? And removing it from the umbraco web.config? I'm not at all an expert here - And when I read through https://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.inheritinchildapplications(v=vs.110).aspx I can't decide on what the correct approach is. Some very clear and visual examples on that page would have been nice! :)

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 20:54
    Mike Larsen
    0

    I have. Umbraco then tries to control the XXX app. Notice the "source file" of the error below. This is when I try to navigate to my app.

    Server Error in '/cws' 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: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
    
    Source Error: 
    
    
    Line 118:       </httpHandlers>
    Line 119:
    Line 120:       <compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.5" numRecompilesBeforeAppRestart="50">
    Line 121:           <assemblies>
    Line 122:               <remove assembly="System.Web.Http" />
    
    Source File: C:\umbraco\web.config    Line: 120 
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 20:54
    Jan Skovgaard
    0

    Hi Again

    Forget my last post - I think I'm getting a bit too tired!

    In the setup where images and /umbraco does not work have you then tried in your custom app's web.config to add

    <remove name="UmbracoModule" />
    <remove name="ClientDependencyModule" />
    <remove name="ImageProcessorModule" />
    

    Like it is suggested in step 5 in this post you originally linked too yourself? I can imagine you have tried many different combinations right now so sorry if this has already been tried in this context.

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 15, 2018 @ 20:55
    Mike Larsen
    0

    I already have those in my app's web.config. :) As I said, I've been trying everything!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 15, 2018 @ 21:04
    Jan Skovgaard
    0

    Dammit :-)

    Just being curious here but In which section have you placed the remove configurations?

    But... Yeah that's really a tough one. But I'm not convinced that it's an Umbraco issue. I think it's more related to the IIS and web.config setting inheritance. I'm not sure what the next step would be but and I have no idea whether we're even close or not...

    I suppose you have also read the suggestions made here? https://stackoverflow.com/a/5968658

    So I'm wondering if you could perhaps consider setting up your app as it's own site as a subdomain instead and then setup a redirect url so that when you hit /xxx from your umbraco site you redirect the hit to the custom app to your subdomain instead? I get that it's not 100% the solution you wish for but perhaps that's the sane workaround instead of being stressed out by the IIS weirdness and web.config settings "party"? :-)

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 18, 2018 @ 14:04
    Mike Larsen
    0

    There is just a lot of weirdness going on in general, but the fact remains that umbraco doesn't totally ignore the entries in the umbracoReservedPaths setting, which is honestly the root of my problem. If it truly ignored it, I wouldn't have this issue.

    I wish I could set it as a subdomain, but our existing app requires it to be mysite.com/xxx, and not xxx.mysite.com

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 18, 2018 @ 14:08
    Jan Skovgaard
    0

    Hi Mike

    Yes but it's more related to IIS and how it deals with the web.config inheritance more than it's an Umbraco issue as such. I think unfortunately you would have had the same frustrations with other .NET based CMS'es running IIS. I honestly don't think that there is much Umbraco can do about it.

    I get that it's really frustrating that it seems like it's not possible to get things working and I wish there was more I could do to help you out but I'm unfortunately all out of ideas.

    Hopefully some of the other bright minds in here can pinpoint what needs to be done in order to get this working.

    /Jan

  • Mike Larsen 8 posts 78 karma points
    Jun 18, 2018 @ 14:56
    Mike Larsen
    0

    I appreciate all of your help

Please Sign in or register to post replies

Write your reply to:

Draft