Free Support Forum - groupdocs.com

Script errors with Viewer


#1

This is the latest .NET Viewer product (2.12.0.0), I downloaded the trial yesterday. After installing the sample projects and running them successfully, I attempted to integrate the code into my project. However, when I go to the page, I get a lot of script errors around “too many redirects”. I’m using this with the Ektron CMS, so I don’t know if there’s something in there that could be causing the issue, but I referred to the Kentico instructions and did what I could with that against Ektron. I’m not getting any of the viewer to load up.



In the header of my file, I’m calling , in my global.asax I’m calling Viewer.SetRootStoragePath(Server.MapPath("~/assets/"));, and in the code-behind I’m calling Viewer.ClientCode().TargetElementSelector("#test").FilePath(assetLink.FilePath).OpenThumbnails(false).ZoomToFitWidth(); where assetLink.FilePath is the path to the files under the assets directory (several directories deep).



I’ve attached a copy of the web.config I’m using to show the handlers in use, as well as a screenshot of my errors. Thanks.


#2

Hello,


We are sorry to hear that you have such issue. From your post we can assume that you have missed such code lines:
<%@ Import Namespace=“Groupdocs.Web.UI” %>

and then in the header of the web page:

<%= Viewer.CreateScriptLoadBlock().LoadJquery().LoadJqueryUi() %>

Also don’t forget to put the library dll in to the bin folder of the project.

We have made some modifications in to your web.config file. Please try with it - attached to this post.

Thank you.

#3

I have the code lines you mentioned, and the DLL is in the bid directory. I applied your web.config changes and got the same results.


#4

Hello,


This issue means that the resource redirects to it self. Since that to be able to reproduce the issue we will need example of your project.

Please share it if possible and we will check and fix it for you.

Thank you.