While trying to create a version of the DNN document viewer using the API, you received a 501 error even after attaching to the header of the get request, the request verification token, module id, and tab id. When trying to resolve this issue by using JWT authentication instead by requesting an authentication token, an infinite loop is returned to the user making the request.
To use JWT:
Retrieve the JWT token by following the steps on https://dnnsupport.dnnsoftware.com/hc/en-us/articles/360004743993-JWT-User-Credentials
Perform the test GET call by following the steps on https://dnnsupport.dnnsoftware.com/hc/en-us/articles/360004704814-JWT-Page-Request
After performing the above steps, unfortunately, an ERR_TOO_MANY_REDIRECTS message is shown. Follow the steps below to workaround the error.
The root cause is that on authentication, the error is coming up and forces the application to check whether logout is required or not. While doing the check, the application tries to verify the token and falling down to the same exception again. It produces an infinite loop and too many redirects error message is showing up to the end-user.
This issue has been fixed in DNN Platform 9.6.2, if you are currently using Platform, you will need to upgrade to 9.6.2 or higher.
If you are currently using Evoq, you will need to wait for a future release of Evoq for a full fix (As of writing, Evoq 9.6.4 is currently on Platform 9.6.1).
In the meantime, you can apply a workaround:
- Download the attached DotNetNuke.HttpModules.dll.
- Go to the Bin folder in the Root directory of your website and take a backup of the existing DotNetNuke.HttpModules.dll file.
- Replace the DotNetNuke.HttpModules.dll file with the attached DotNetNuke.HttpModules.dll.
If the next release of Evoq does not contain Platform 9.6.2 or higher, you will need to perform these steps once again after an upgrade as the upgrade will overwrite the files that were replaced.