Free Support Forum - groupdocs.com

Document viewer files not loading (installableViewer.min.js...etc) error 500


#1

Hello,


I can’t make the GroupDocs.Viewer for .Net to work. The css and js files status are all error 500. I am currently using a trial version. Please see my attached image file.

#2

Hello,


We are sorry to hear that you have such issue. Unfortunately from your post is not clear how to reproduce the issue. Could you please provide next info:
1. Project type - web forms, mvc etc.
2. pipline mode
3. version of the Viewer that you use
4. code example of the web config file and Viewer initialization

Thank you.

#3

Project type - MVC

GroupDocs.Viewer version - 2.17

Code example: Please see attached web.zip and files.zip

#4

Hi again,


Thank you for the examples. I have fixed them, find fixed version attached. The issue reason is that that you have set http handlers in the web.config - in case MVC project such approach is unacceptable. Also you missed .UseHttpHandlers(false) in the _Layout.

Best regards.

#5

Hello again,


The js and css files still has error 500. :frowning:

#6

Hi,


Can you please try to open directly one of the failed requests and share the error.
For this simply copy one failed request URl and open it in the browser.

Thank you.

#7

Hello,


Here is the error below.

#8

Hi ,


Does you use Unity or some other IoC tool?

Thank you.

#9

Yes we are using Unity.


#10

Need help please.


#11

Hello,


In case using Unity you should configure it properly to register “GroupdocsViewerController” and make constructor injection. For example in the App_Start you can do next:
public static void RegisterTypes(IUnityContainer container)
{
container.RegisterType<Groupdocs.Web.UI.Controllers.GroupdocsViewerController>(new InjectionConstructor());
}

Best regards.

#12

Hello,


The js and css files are now loaded. Thank you. The test files folder is in the same lvel as the other folders inside the project. But I have a new error below.



#13
Hi,

We have prepared example project with Unity and GroupDocs.Viewer for you. Please download it here and compare with your project.

Best regards.

#14

Thank you for the sample code.


Another question. How can we exclude the loading of some files like the files below? Because our app is using a much latest version of the scripts below.

#15

Hello,


Thank you for this question. You can easily disable them by setting false for these parameters:
LoadJquery(false) LoadJqueryUi(false) and if needed LoadKnockoutJs(false)

Best regards.