DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

File references 404 unless uploaded through Site Assets

 47 Replies
 2 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Page 1 of 512345 > >>
Author
Messages
Growing Member
Posts: 39
Growing Member

As the title reads, we have been making some updates to our DNN and have run into a problem. Both with individual uploads and module .zip installs, all new content in the form of .html, .js, and image assets are ignored by the system unless I explicitly upload them through the Site Assets feature. Uploading through FileZilla or the azure scm for the site both work, but the pages will serve a 404 whenever we try to access those resources.

All old modules are still working, and old content is still accessible. Only if the content is changed or new files are uploaded does the site insist they don't exist. I've added .html and .js files to the "allowed extensions" to let me upload through Site Assets which works fine for some simpler pages, but I can't get the DesktopModules/Scripts that way to update the .js files.

I've run into a similar situation in the past when I needed to serve up .mp4 files and all that took was allowing .mp4 extensions and updating the MIMEType in webconfig, but I've just had this issue occur for a new jpeg and those are already allowed.

Current MIMETypes in config are ".mp4," ".m4v", ".svg", ".woff". 

The site is running 9.6.1 and is one of several independent installs we have of simple sites, all of which are hosted by azure. They were all upgraded to 9.6.1 at the same time and none have exhibited this issue until this individual site the last week. None of the others are having issues.

This restriction is making it impossible to update old modules or deploy new ones as DNN simply ignores any script changes or additions to modules. My next step is to take a shot in the dark and map html and js in MIMETypes carefully to see if that changes anything. Any other guidance would be very helpful as development is dead in the water currently.

Thank you.

Veteran Member
Posts: 1246
Veteran Member
MVP
MVP
You're an MVP!
After upload files by external methods, you need to go to the file manager and "synchronize" the files. This is an option in the File Manager.

Any files you upload must be recognized (by their extensions) by DNN. You configure that in the Persona Bar's Security/More/More Security Settings Persona Bar page.

Mime types do need to be configured correctly so the IIS will serve them up, but you also need to tell DNN which are legal file types. This is set up so that "any old" file type cannot be uploaded unless admins permit it.

And, are you really loading HTML pages into DNN?
Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By Joe Craig on 02 Nov 2020 08:17 PM

And, are you really loading HTML pages into DNN?

Right, I was thinking the same, what's the use case for that?

 

 

Growing Member
Posts: 39
Growing Member
Posted By Joe Craig on 02 Nov 2020 08:17 PM
After upload files by external methods, you need to go to the file manager and "synchronize" the files. This is an option in the File Manager.

Any files you upload must be recognized (by their extensions) by DNN. You configure that in the Persona Bar's Security/More/More Security Settings Persona Bar page.

Mime types do need to be configured correctly so the IIS will serve them up, but you also need to tell DNN which are legal file types. This is set up so that "any old" file type cannot be uploaded unless admins permit it.

And, are you really loading HTML pages into DNN?

 

Thanks for your reply. Is a module install through Extensions -> Install Extension considered an "external method"? It doesn't seem that way to me, but like I said it is ignoring new .js files that are part of module installs. That's a bigger issue at the moment than uploading external assets.

I can see th"Synchronize this folder and subfolders" in the File Manager which will be useful but it's not going to reach DesktopModules/Scripts for new modules, since that directory is not part of the File Manager.

As for uploading HTML files, there's exactly one page on the site using an old module called HTMLDirect that displays an HTML file from the directory instead of going through the editor. It's been around since before I took over managing this particular instance. My understanding was the HTML editor module was giving the original developer trouble and they no longer wanted to butt heads with it. 

EDIT: Using "Sync this Folder" in Site Assets is currently not loading any of the extra external files or old files in the directory into site assets. Not a big roadblock as it's easy enough to upload anything I'll need through Site Assets except for the module development part of the issue -- but this behavior may point to the larger problem?

Veteran Member
Posts: 1246
Veteran Member
MVP
MVP
You're an MVP!
You are right that files installed with an extension are not covered by my previous post. I guess I misunderstood the question.

Can you explain more about how those files are ignored? How are you loading them or otherwise trying to use them? And, are the files actually installed where you want them to be installed? And where is that? Are your js files installed in DesktopModules/scripts or in DesktopModules/ModuleName/scripts?
Growing Member
Posts: 39
Growing Member
Posted By Joe Craig on 03 Nov 2020 10:25 AM
You are right that files installed with an extension are not covered by my previous post. I guess I misunderstood the question.

Can you explain more about how those files are ignored? How are you loading them or otherwise trying to use them? And, are the files actually installed where you want them to be installed? And where is that? Are your js files installed in DesktopModules/scripts or in DesktopModules/ModuleName/scripts?

Well, there were some non-extension files that were being ignored too, so your previous post was helpful!

As for the extensions, they're nothing too complex and are the same format we've been using for a while. We will develop an extension, usually some .cs and .js code to load up a view to display some charts or other content. The module will be placed on a page and use an .ascx view to load some HTML which in turn loads the .js using the