Copied to clipboard

Flag this post as spam?

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


  • Toby 10 posts 110 karma points
    Nov 24, 2020 @ 17:48
    Toby
    0

    500 Error on images after installing Nexu

    Hi there,

    I'm getting an error on some images since I installed Nexu.

    There was an initial problem where suddenly I had to clear up some ambiguous class references in my CSHTML files, but that seems unrelated.

    Now, on some pages, my images don't appear and if I 'open in new tab', I get this error:

    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.
    
    Things you can try:
    Migrate the configuration to the system.webServer/modules section. You can do so manually or by using AppCmd from the command line. For example, from the IIS Express install directory, run appcmd migrate config "Default Web Site/". Using AppCmd to migrate your application will enable it to work in Integrated mode. It will continue to work in Classic mode and on previous versions of IIS.
    If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false.
    Alternatively, switch the application to a Classic mode application pool. For example, from the IIS Express install directory, run appcmd set app "Default Web Site/" /applicationPool:"Clr4ClassicAppPool". Only do this if you are unable to migrate your application.
    

    I've already got the recommended configuration in my web.config:

        <location path="." inheritInChildApplications="false">
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false" />
    

    So I don't know what else I can do. I can't change the IIS settings, they have to be in the web.config. file.

    If you have any suggestions, I'll gladly try them.

    Thanks!

    Toby.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Nov 24, 2020 @ 18:50
    Dave Woestenborghs
    0

    Hi Toby,

    Can you provide some more details on your setup ?

    • Which version of Umbraco are you running
    • Which version of Nexu did you install. And how did you install it : nuget or through the zip ?
    • What is your hosting setup ?
    • Can you reproduce it on a empty umbraco install
    • What other packages do you have installed ?

    Strange it reports about errors on the web.config because Nexu does not do any modifications on the web.config

    Dave

  • Toby 10 posts 110 karma points
    Nov 24, 2020 @ 21:22
    Toby
    0

    Hi Dave,

    Thanks for quick response. I'm using version 7, with the latest 7-compatible version of nexu. I used the package manager to install it.

    install-package our.umbraco.nexu -version 1.7.5
    

    (from memory)

    This is just running locally on my machine. I did not try on empty umbraco install, that's unlikely to happen at this point, sorry. I think NuPicker is the only other package installed, that is specific to umbraco.

    But the most likely issue is the one in your last comment (that it doesn't affect the web.config). It made so many changes to the config that I spent an hour working out what the differences were and moving them over manually, because the install process removed a lot of custom configuration. This seemed strange at the time, but now you say this, I think something is wrong with the nuget package installer.

  • Toby 10 posts 110 karma points
    Nov 25, 2020 @ 11:31
    Toby
    100

    I'm reinstalling it via the nuget package manager interface (rather than the PM Console), to see if that helps.

    This appears to have worked. There was only a minor edit to web.config this time. I have a question, though. It looks for and updates Application Insights. Why is this?

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Nov 25, 2020 @ 11:39
    Dave Woestenborghs
    0

    Hi Toby,

    Like I said before. Nexu does not make any web.config changes. The only config file that will be changed is the dashboard config of Umbraco.

    Can you perhaps tell me what it is changing. The package has no connection to application insights either.

    Dave

  • Toby 10 posts 110 karma points
    Nov 25, 2020 @ 11:50
    Toby
    0

    Hi Dave,

    I know you said that before, but I can assure you it made many changes to my web.config:

    It re-ordered the nodes (without changing them). It deleted a lot of custom nodes (i.e. ones we'd added). It even removed values assigned in key-value pairs.
    It removed the URL rewrite section entirely. Sections which were wrapped in 'location' tags (system.web and system.webserver) had that wrapper removed.

    It was like it had replaced our web.config with its own. I can understand that this wasn't intended behaviour, but something in the PM script was doing this (when installed via PM CLI), but doesn't do it when using Nuget UI. I've no idea why, but that's what we observed.

    Obviously, we were quite perplexed at this behaviour, but one dev said he'd seen this before with Umbraco plugins, so I just fixed the changes and kept the ones that appeared necessary for Nexu*. This didn't work, so I've installed it via the nuget UI instead. This install went smoothly, it didn't update the web.config, but I don't see any dashboard in the settings area, so it seems to not have worked...

    I'm just looking into that now. Nexu is in my packages.config and the nuget UI says 1.7.5 is installed (we're on Umbraco 7.7.13).

    FYI: I've repeated this process a few times and each time Application Insights is referenced as updated during the installation process. It moves from 2.12.0 to 2.12.1 If you don't use it, then I'm guessing one of your dependencies does?

    • this was before you told me it didn't do any changes.
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Nov 25, 2020 @ 13:44
    Dave Woestenborghs
    0

    Still intrigued by the application insights update. The only dependency the Nexu nuget package has is on Umbraco Core 7.3

    And as far as I can see that does not have a dependency on anything application insights related.

    Dave

  • Toby 10 posts 110 karma points
    Nov 25, 2020 @ 14:53
    Toby
    0

    It's a weird one. I suspect this wouldn't happen if AI wasn't already installed. But even so, I'm not sure why it would do so much to change the web.config. Really strange, but it's working now.

    Thanks for your help!

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Nov 25, 2020 @ 15:16
    Dave Woestenborghs
    0

    The only thing I can image that happend is that when you installed it through the command line, it did not install 1.7.5 but the latest which is for v8

    And because there is a dependency on V8 it will try to install that as well.

  • Toby 10 posts 110 karma points
    Dec 03, 2020 @ 09:46
    Toby
    0

    Yes, that did happen, but I rolled it back completely, do didn't think that was a factor afterwards. Good call!

  • Toby 10 posts 110 karma points
    Nov 25, 2020 @ 11:56
    Toby
    0

    Update: Nexu is installed, it's just in the Developer section, not the settings section (the info page says it's in the settings section).

Please Sign in or register to post replies

Write your reply to:

Draft