Open DNNMonster opened 5 years ago
It does look like there may be an issue in the piece that adds new mimeMap
elements. To help narrow it down so we can reproduce more easily, can you let us know what version you're upgrading from?
Sorry. I got my versions wrong. This was an upgrade from v. 09.03.01 (2) to v. 09.03.02 (24). I think it may have impacted the last upgrade as well but I forgot to document it.
@DNNMonster I'm not able to replicate an issue (despite seeing a potential issue in the XML merge script that makes this change). Do you have anything unusual in that section of your web.config
? Are you using a location
element anywhere? Would you mind posting that section of your web.config
here (or, even, the whole file, after removing any confidential data)?
Hope we can help!
Below is the pertinent section that gets duplicated by the upgrade & causes the error. This section was already in our web.config before the upgrade. It showed up twice in the web.config after the upgrade.
<staticContent
<remove fileExtension=".svg" /
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /
<remove fileExtension=".woff" /
<mimeMap fileExtension=".woff" mimeType="font/x-woff" /
</staticContent
I am also not able to replicate the issue. @bdukes you have a clue about a fix for this ? I am thinking in https://github.com/dnnsoftware/Dnn.AdminExperience/blob/development/Library/Dnn.PersonaBar.UI/Dnn.PersonaBar.UI.dnn but maybe not seing the obvious in there, it looks to me like it is trying to update it, then it tries to remove them and re-add them... Strange.
Yeah, it's strange, not sure why it's doing it that way. The first one is trying to add it wholesale, but since staticContent
can already exist, it also needs to add them one-by-one, so the content in the first one isn't really used (when I do something like this, I just add <staticContent></staticContent
). It then removes each remove
and mimeMap
element, and then re-adds them, when it could just update them. The issue that I notice is that it's using key="mimeMap"
when it should use key="fileExtension"
, but that doesn't really come into play since those elements are getting removed anyway.
In this issue, it seems that the staticContent
section is being added even though it already exists. The only reason I can think of for that would be if there's a location
element in the web.config
. @DNNMonster does your web.config
have any location
elements?
Yes but not related to staticContent. The site has 2 location tags for js file paths to set custom headers related to experimenting with running service workers in a sub directory. I don't think it would affect the staticContent section but I can post it if you think it may.
That would be great, if you can share those. It's possible there's a bug around how we're handling location
elements that's related to the duplication
`
I really thought the presence of system.webServer
elements in your location
elements would be the culprit, but I added those location
elements to my 9.3.1 site and upgraded to 9.3.2 and still can't reproduce the issue. 😞
Something still within the site's web.config but if it can't be reproduced let's close it. It'll come up again if another user experiences it & this thread will probably get noticed.
I have been facing this issue with StaticContent duplicate nodes in web.config since last few releases. Recently I went from 9.2.2 to 9.4.4 and ran into this.
@kkp0045 I'd love to be able to track this down, you don't happen to have a backup of your 9.2.2 site where we can reproduce this, do you?
I have multiple dnn instances on my dev machine and I tested this on 2 of them. I still have 1 more left to where I have not applied the updates. What would you need from me?
If you would be willing to send a full backup (file system and database), that would be most helpful, but I totally understand if that's not possible. Otherwise, a copy of your web.config
(with redacted passwords and keys is fine) might help. Also, aq list of third party extensions or noteworthy configuration may also point us in the right direction.
My company policy would not allow me to send full backup. I can certainly send you the web.config file. Yesterday after I had this issue on my 1st instance, I was monitoring web.config file during second instance update and I found exactly when the web.config gets updated with that duplicate node. It was right when install.aspx?mode=upgrade page finished installing all modules/updates. Dont know if it helps.
I do not have any third party extensions installed. Just custom extensions developed by me. I cant think any of the configuration I did that is related to this issue.
Hope this helps. Let me know if you want me to try something. I can run tests on my local instance however many times we want.
Great, thanks! Are you upgrading straight from 9.2.2 to 9.4.4, or are you doing any steps in between?
Straight from 9.2.2 to 9.4.4
I can replicate the bug with this
web.config
, so hopefully we're one step closer to tracking it down and fixing it. Thanks @kkp0045!
Upgrading to DNN 9.2.2 on an installation which already has the staticContent in the web.config specified results in a hanging installation.
It may be the installation should check for this element before creating a new one..??
In our situation, when we comment out the existing web.config's static content before the upgrade then the installation goes perfectly.