Viewer Integration Error

Hi


I am trying to integrate Viewer in my ASP.net application and I have followed exact sequence of steps as per following article

http://groupdocs.com/docs/display/viewernet/How+to+use+GroupDocs.Viewer+for+.NET+in+an+ASP.NET+Project

I am using latest version of viewer i.e. GroupDocs.Viewer for .NET 2.13.0 and Visual Studio 2010.

I am getting attached error on browser while my page containing viewer loads, I got to know this error using developer tools (F12)

Can you please help me to resolve this issue ?

Regards
Saurabh Sondhi

Hello Saurabh,


We are sorry to hear that you have such issue. To resolve this issue please add such code to the web.config file in to the <system.webServer> section:


Best regards,

The issues you have found earlier (filed as WEB-2103) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocsNotifier.

Hi Pavel

I tried the instructions as per your last message but no success.

Check attached for the error I am getting.

We need to resolve this quickly, can we chat on Skype or I can show you my screen.

If there is a number where I can call you then I do that as well.

Regards
Saurabh Sondhi

Hello Tara,


Unfortunately according on our support polices we provide technical support only via forum. To be able to reproduce your issue we will need additional information, could you please share with us next:
1. Web.config
2. Globals.asax.cs
3. Full code of the web page with the Viewer
4. .NET framework version

Thank you.

Hi Pavel

Please check attached for page, web.config & global.asax

I am using Visual Studio 2010 & framework is 4.0.

I would appreciate a quick resolution from you, we are already delayed on the project.

Regards
Saurabh Sondhi

Hello Saurabh,


Thank you for the examples. We have checked and updated your code. Please download and check attached package.

Thank you.

Hi Pavel

Its still not resolved, check attached for errors I am getting.

I have tried in Chrome, FF & IE.

Regards
Saurabh Sondhi

Hi Pavel

As discussed, please check attached for web.config at my end.

Regards
Saurabh Sondhi

Hello,


Thank you for the example sharing. We have checked your configs and tried to reproduce your issue - unfortunately we can’t, all works well for us with your web.config, we tried with virtual directory (as in your project) and with out it. Since that we definitely need your project example, sorry but with out it we can’t reproduce the issue. Don’t worry about the security - this post is private only you and GroupDocs admins can see it.

Thank you.

Hi Pavel

I can’t give your source code.

Please let me know what other option we can try.

If we are not able to make it work then we need to cancel the license we have bought.

Regards
Saurabh Sondhi

Hi

resolved out of the forum.

Hi Pavel

Thanks so much for your support to resolve this issue.

Its working fine on Visual Studio but its still showing me trial version in my application and also when I login into group docs.

Check attached files & license file I am using.

Regards
Saurabh Sondhi

Hi Saurabh,


Glad to hear that all works well.
As for the license - you don’t need to log-in with GroupDocs. You simply missed correct license path. You have such code: Viewer.SetLicensePath("~/License/GroupDocs.Viewer.for.NET.lic");
should be - Viewer.SetLicensePath(Server.MapPath("~//License/GroupDocs.Viewer.for.NET.lic"));

Hi Pavel

Thanks for your inputs, this issue is resolved.

I hope there won’t be any issues while we deploy on server.

Regards
Saurabh Sondhi

Hi Pavel

We are doing well with integration, I need your help on following

1) Do you support multi language ? Our project is in French & English.

If yes then how can we specify language

2) Currently viewer is stretching image if size is smaller, we want viewer to show exact same size image.

There must be some properly for this, which we are not able to find.

3) .Streams (Multiple Images) is not working is we give single stream, we are not sure if we have a single image or multiple images, so that is why we are not using .Steam Method.

4) If I want to use multiple instances of viewer dynamically i.e. we are not sure if I will 2 or 3 instances of viewer on page.

In this case how we will use this ? We tried this but viewer is not displaying.

Regards
Saurabh Sondhi

Hello Saurabh,


Glad to hear that you have successful integration.
1. Yes, you can set required language with .Locale(SupportedLocales.enUS) property. Currently we doesn’t have French local. Please check attached translation file and update it with the propper word translations, then share it back to us and we will add French local.
2. To set image size you can use this option .MinimumImageWidth(int imageSize)
3. In case using Streams() property you should put list of the streams in it even if you will have only one stream. For more info please check this documentation
4. In case that you need several Viewers on the web page you should create several div elements with different id and several Viewer widgets (one for each div) then use this id in the Viewer widgets.
For example you need two Viewers:
<div id=“test”(https://TRUE)" style=“width: 100%; height: 800px; position: relative;margin-bottom: 20px;”>
<%= Viewer.ClientCode()
.TargetElementSelector(“#test”)
.FilePath(“candy.pdf”)
%>
<%= Viewer.ClientCode()
.TargetElementSelector(“#viewer”)
.FilePath(“example.docx”)
%>

Best regards.

Hi Pavel

We will provide french translations in next few days.

Meanwhile can you please tell us where we need to change in code to show french.

Regards
Saurabh Sondhi

Hi Saurabh,


Thank you. When you will share translations we will add them to the Viewer and share with you updated VIewer library. Then you will just need to add such code line .Locale(SupportedLocales.frFr) in the Viewer widget.

Best regards.

Thanks Pavel, it works for us.

For the following, how we would know image size ? Do you mean to say we will programmatically find the size and then pass it to this method ?

To set image size you can use this option .MinimumImageWidth(int imageSize)

Is there a feature through which viewer can adjust as per size of image ?

Regrads
Saurabh Sondhi