Error 500 - Angularjs with DNN - Christoc.Module ng-include - angularjs

I have an application that I build using VB.NET and angularJS in DNN with the Christoc.Module module. There seems to be 2 issues. When I build my project and refresh the page on my site, I will receive an error 500. The same result happens on the site unexpectedly after being idle for about 30 minutes. I have tried to change settings on the website web.config to see if it was a session expiry timeout, but that doesn't seem to be the case since all pages that where access before the error are fine, and can access server functions.
I was wondering if anyone has ever seen something similar.
I use ng-include to show the current "active page". I have tried using the AngularJS $route and the same behaviour occured.
<div class="animate-repeat" ng-repeat="path in PathLinks| filter:{'path_name':variable}:true" ng-include="'/DesktopModules/module/path/' + path.path_name + '.aspx></div>
CLick here for image of the issue

I ended up simply recreating the whole module with a newer version of the visual Studio DotNetNuke Compiled Module. The original module was created using an older version of that extension. This seemed to have completely fixed the issue for me.

Related

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR in our React app with .Net core 3.1

I am facing following error in our React with .NET core 3.1 application. Our application was working perfectly until yesterday. Today my system auto rebooted post windows auto updates after that my application stopped working.
The home page is blank and the following error in chrome and Edge browser.
"Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR"
Updating Visual studio to Version 16.9.7 fixed the issue for me.
https://learn.microsoft.com/en-us/visualstudio/releases/2019/history#installing-an-earlier-release
See some discussion here, they mention that the root cause is KB5003637 windows update installed. It also happens in my case: two days ago the app started to have errors like yours.
One of solutions is to uninstall the patch until MS releases a second patch.
I can add that I'm getting the same error in Blazor. I thought it was just a VS thing, but my live website is also failing randomly (about 1 time in 20). So it looks a lot like a Windows problem.

DNN 9 Module only displays in Edit Mode

We recently upgraded an old DNN site to the latest version (9.8.00). Everything has been running fine for the most part, but today I have ran into an issue I can't figure out how to resolve. Once of my users dropped an HTML module on the page but we can not get it to display outside of edit mode. I have tried adding an HTML module to other pages as well to see if it was isolated to an individual page, but it's doing the same thing across the entire site. I have tried all of the following things to no avail.
Debugged the page to make sure no errors where being thrown and none are.
Stopped inheriting permissions and made the module visible to all users.
Changed the Cache settings for the module to 0.
Verified the site was running on .Net 4.5.1 (I'm actually on 4.7.1).
Tested two other modules (link and event), both of these modules display outside of edit mode.
I am at a loss at this point. The HTML module is showing as version 9.8.0, but has an upgrade version as 10.0.3. So I'm not sure if that means it needs to be upgraded or it has already been upgraded.
Any help would be greatly appreciated.
Recents versions of the HTML module have this behaviour: they doesn't appear when they haven't any content. After you add some content, they keep displayed.
I think this feature is related to the default template which is containing an empty HTML module.

Updating Angular HotTowel v2.3.3 to latest Angular packages in VS2015 kills routing

background:
I'm just getting started with AngularJS and I'm using HotTowel as a starting point.
I've actually done a fair amount of work with HotTowel and have several features built for an application I'm doing. What led me to this problem is trying to get ui-grid in to my application. It blows up. Looking at HotTowel it seems to have been a while since it was last update, but the Angular stuff (and other libraries) are full steam ahead. When I update all of the Angular packages HotTowel's navigation stuff stops working. I'm going to start chasing it down, but I thought I might ask if somebody else has already fixed this issue to save myself some time.
Reproduction:
I'm using VisualStudio2015. My project is an ASP.NET Web Application (.NET Framework) w/ just MVC added.
For the reproduction of the issue I used the above in a new solution. I then went to manage NuGet packages and update everything to latest, there should be 10 updates. This requires a restart of Visual Studio.
Once I'm back in I return to my solution and bring up Manage NuGet pakages again. This time I go to Browse and find HotTowel. This brings up a short list. I select HotTowl.Angular by John Papa (~73.6K downloads, version v2.3.3) and install it. Allow it to overwrite the favorite icon.
After NuGet finishes go to the solution explorer, find Index.HTML, right click on it and select "set as start page". Now, open Index.html and change line 51 to say "" and save it.
Now do a rebuild all and then run the application using Google Chrome (issue will occur with any browser). Everything works great. You can switch between dashboard and admin.
Stop the application and return to manage nuget package. select the update tab and update all of the packages. You'll be asked about overwriting some map files, go ahead and do it.
Do another rebuild all and then run the application.
The dashboard will come up as before, click on admin. You will see dashboard fade out and then fade back in. This is the issue. the routes appear to be broken.
At this point there is nothing custom in the solution. We have just updated all of the packages to their latest releases. HotTowel, however seems to have a gone stale.
Being new to Angular, and HotTowel. I'm not sure where to start debugging this.
At a guess the issue is with how the code in config.route.js sets up the routes.
Can somebody please give me some hints on how to fix this?
TIA

AngularJS site only working when launching through IIS

I am using Visual Studio Community 2015 to build HTML-Pages as I like the editor. Today I am working on a page which generates its content with AngularJS and is being formatted by Fullpage.js
Now I am trying to debug my page. When I am launching it with F5 on Visual Studio, Angular works as it should and creates all data I want it to create, but fullpage.js does not work (no console errors, just not doing anything at all).
If I am opening the html file manually in my browser, the exact opposite happens: Angular does not work (I tracked it down to the part of my code where I fill my $scope via $http.get() to a local json file), but fullpage.js seems to work fine, just without content.
I imported fullpage, angular and jquery through the nuget packet manager, might that be the issue or am I missing something?
Have you tried to deploy your code to a different server instead of opening it up in your browser? This sounds like a CORS problem.

DNN 7 Can No Longer Edit Page

One of my DNN 7 sites has lost its ability to edit any of the pages. It now alway displays the Modules, Edit and Pages menu regardless if admin is logged in or not. When I try to edit a page, a window appears and then quickly goes away. There is nothing of use in the event log and I have tried different skins with no luck. I have another DNN website on the same computer and it works fine.
I have found that I am losing permissions to ToggleUserMode after I recompile a custom module that I'm developing has been installed on a test page and then recompiled in debug mode.
I'm wondering if this can be related to the fact that when I install DNN I blank out the default installation option of creating a dotnetnuke application. I leave that option blank and create the installation in the root of my website.
P.S I tried the amended module tag suggested on SO without any luck.
I finally figured this out. I had originally bound www.example.com to my default website but later created a new site for www.example.com. Apparently most of the requests were going to my new site, but the request for authorization for page editing was going to my old site which resulted in the 401 error. I rebooted my computer and disabled my default website and all is well.

Resources