Hi,
I am trying to set up groupdocs viewer in my .NET MVC application. I am following this help tutorial - http://groupdocs.com/docs/display/viewernet/How+to+Use+GroupDocs.Viewer+for+.NET+MVC4
But I get the following console error - Cannot read property ‘prototype’ of undefined at $.fn.groupdocsViewer.prototype.applicationPath
What could I be doing wrong?
Hi Shweta,
Thanks for getting in touch. We’re sorry to see that you’ve issues using GroupDocs Viewer library in an ASP.NET MVC4 application.
The article - How to Use GroupDocs Viewer for .NET in an ASP.NET MVC4 Project is revised. Kindly download the sourcecode for the project described here.
I hope this of help. Please let me know if you have any additional questions and I’ll be glad to help.
Best Regards,
Vipin Thomas
GroupDocs Support.
Hi Vipin,
Thanks for you reply. I followed the same steps mentioned in the tutorial. Unfortunately, I still get the same error - Cannot read property ‘prototype’
of undefined at $.fn.groupdocsViewer.prototype.applicationPath
Our application uses Angular Js framework and Groupdocs uses Knockout JS. Do you think this issue could be due to any incompatibility between Groupdocs and Knockout?
Any help is greatly appreciated.
Thank you.
Hi Shweta,
Hi Derek,
Thanks for your reply. I am already loading jquery and jquery in our application. So I have this currently - @Html.CreateViewerScriptLoadBlock().LoadJquery(false).LoadJqueryUi(false)
What I just noticed is that all script tags src like this -
“http://myapplicationdomain/document-viewer/GetScript?name=GroupdocsViewer.all.min.js
”
return blank response. So it looks like that the path to document-viewer scripts is not getting set right or the scripts are missing.
Thank you!
Hi Derek,
I am using Angular JS framework in my app. Do you think this behavior is due to some inconsistency between Angular Js and Knockout JS?
Hi Shweta,
Hi Derek,
We just created a barebone sample project for you to look at. You can download it here -
https://www.dropbox.com/s/t6zitzgnzi9x5t9/angular.groupdocs.example.zip
Please let me know if you have any questions. I really appreciate your help with this issue.
Thank you!
Shweta
Hi Derek,
Did your team get a chance to look at the sample project?
-Shweta
Hi Shweta,
Hi Derek,
Any updates on this issue? I am sure your team ran into similar blocks as we did.
-Shweta
Hi Shweta,
That’s great. Thank you for the update.
- Shweta
Hi Sergey,
The sample project looks good. Thank you so much for having this issue fixed.
Did your team have a formal release for this update? We are hoping to test integrate other libraries for comparison, annotation etc. Not sure if updated DLLs are available on your site already.
- Shweta
Hi Shweta,
We are glad to hear that everything is working well for you now.
About the new releases – we are working on new releases for all .net libraries at the moment, so if you check back tomorrow afternoon, new versions should be available for download.
Many thanks,
Sergey
Sergey Zhuravel
GroupDocs Developer Support
Hey all,
Hi Chris,
We are sorry to hear that you have issues with our library in your project. We have passed your sample to our support developers to investigate the issue; maybe some updates in the sample or in the library will be required. We will notify you as soon as the issue will be fixed.
Many thanks,
Sergey
Sergey Zhuravel
GroupDocs Developer Support
Hello Chris,
Thanks for getting in touch,
We have some good news for you, we've managed to fix the sample you sent us and it's working well for us here. You can download fixed sample here - https://www.dropbox.com/s/xuuufbu0xnhempo/angular.groupdocs.example%20%282%29.zip
We made the following changes:
1. In the file groupdocsDiv.html - we added a new div element that will trigger the appropriate script from example.common.controller.js
2. In the file example.common.controller.js - we added some JS that will generate the GroupDocs JS function for rendering an instance of the GroupDocs Viewer for .NET
Please test our solution and let us know if this works well for your project.
If you have some more questions or if we can help you further, please feel free to get back in touch.