Free Support Forum - groupdocs.com

How do I set up an annotation server


#1
I have followed the technical article 'How to use GroupDocs.Viewer for .NET with SharePoint server' this has enabled me to get the groupdocs viewer .net working for SharePoint 2013.

How do I get the groupdocs annotation .net working?

The equivalent article uses a different mechanism for annotations and requires the urls of a '{root url of running GroupDocs.Annotation for .NET}'.

I have not been able to find any instructions on how to setup an annotation server/

How do I set up an annotation server?

#2

Hello,


Thank you for your interest in GroupDocs. Currently we have developed a ready for use GroupDocs.Annotation plugin for the SharePoint 2013 (please follow installation instructions in the README.md).

Thank you.

#3

Thanks


I have tried to install but get an error when installing the virtualPathFix:

Expected solution {1e026acb-73bd-4435-9ebd-6eb0672f2c5e} not found

#4

Hello,


We are sorry to hear that you have such issue. We have fixed the issue, please download fixed package and try again.

Please notify us with the results, thank you.

#5
Thanks, that fix has allowed the solution to install.

I have now installed and configured the annotation solution , and no am unable to logon or connect to sharepoint, the following error is displayed:

Server Error in '/' Application.
virtualPath

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: virtualPath

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: virtualPath]
Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider.GetCacheDependency(String virtualPath, IEnumerable virtualPathDependencies, DateTime utcStart) +429
System.Web.WebPages.ApplicationStartPage.MonitorFile(String virtualPath) +239
System.Web.WebPages.ApplicationStartPage.ExecuteStartPageInternal(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +132
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +46

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, Func`2 fileExists, Func`2 createInstance, IEnumerable`1 supportedExtensions) +182
System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application) +386
System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application, Action`1 executeStartPage, EventHandler applicationStart) +119
System.Web.WebPages.WebPageHttpModule.InitApplication(HttpApplication application) +75
System.Web.WebPages.WebPageHttpModule.Init(HttpApplication application) +323
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +558
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +322
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +384
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +397

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +630
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +763

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408

#6

Hello,


We glad to hear that the first issue was resolved and we are sorry that you faced with VirtualPath issue. To be able to found out the issue reason could you please check and share with us logs of your SharePoint server and check the logs in the Windows Event Viewer.

Thank you.

#7

I have forcible activated the feature ‘SPRazorView Feature1’ using SharePoint manager. This has worked and I can now connect to the sharepoint seerver.

Gave everyone full control (as there are instructions for the viewer to change permission) over the C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\GroupDocsAnnotation

Within a library I have the Annotate button this when pressed gives a file not found error. I examined the uls log and found the error :

System.IO.FileNotFoundException: Could not load file or assembly ‘Groupdocs.Web.Annotation, Version=1.7.0.10811, Culture=neutral, PublicKeyToken=c037f897af36d52e’ or one of its dependencies

This assembly is not in the bin directory nor in the global assembly cache.


#8

Hello,


We have fixed the issue. Please download fixed version then retract GroupDocs.Annotation solution and then install fixed version.

Also please make sure that you have copied db.sdf file to the App_Data folder (which placed in the root off your SharePoint application) and set read/write permissions for the App_Data folder.

#9

The zip file would not extract the setup.exe, setup.exe.config and two images. So used these files from the previous release.

Now when loading the annotation page get:

Could not load file or assembly ‘GroupDocsAnnotation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f68bad35d2e6bbb3’ or one of its dependencies. The system cannot find the file specified.

So added GroupDocsAnnotation to the bin folder from the previously provided solution files

perfomed an iisreset

still get the same not found error.




#10

Hello,


Thank you for coming back. Please double check that in the bin folder of your SharePoint project you have all these dll’s. Then recycle your application pool in the IIS manager.

In case that these steps will not help you we prepared new .wsp file which will install these libraries to the GAC (do not delete them from bin folder in any case). You can download it here , then you should overwrite wsp file which you has in the unzipped installer and re-install plugin.

Also will be useful to clean cache of your project.

#11

Tried bur still did work, Found a GroupDocsAnnotation.dll so added it to the bin folder.

Still not working.

So I used ilspy to inspect the assemblies and found that the aspose *.dlls are reefrenced but not in the bin folder. Found these in teh GFroupDocs.Viewer solution so added the to teh bin folder.

Modified the js file so that the path was not /_layouts as his was causing the urls to default to a root site collection whilst my test site is in a secondary site collection.

There are still problems with SharePoint Alternate access Mappings and multiple web appkications, these can be sorted later.

My next stumbling block is that I now get the error:

System.ArgumentException: A route named ‘signalr.hubs’ is already in the route collection. Route names must be unique. Parameter name: name
at System.Web.Routing.RouteCollection.Add(String name, RouteBase item)
at System.Web.Routing.RouteCollectionExtensions.MapOwinPath(RouteCollection routes, String name, String pathBase, Action`1 startup)
at System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection routes, String path, HubConfiguration configuration)
at Groupdocs.Web.Annotation.WidgetFactory.Initialize(HttpContext context, String storagePath, String connectionString, Boolean useJsonRepo)
at GroupDocsAnnotation.Layouts.GroupDocsAnnotation.GroupDocsAnnotation.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


#12

Hello,


Chacnging the path in the JavaSCript file is incorrect approach since the SharePoint stores all pages in the _Layout folder which included as a virtual folder to the all projects. And the web page which is called via ajax request and opened in the modal window (GroupDocs.Annotation web page) is stored in the _Layouts folder. If you will change ajax path - you will get error that web page is not found. Please check this article for more info about it.

As for Signalr issue - This issue is more general issue then specific GroupDocs error. Please check that you have only one version of the signalr, ensure that you didn’t added it manually. More info can be found here. When we reproduced the issue these steps resolved it:
1. In the IIS manager right mouse click on your web site and select next http://prntscr.com/6fti4h
2. Then in the opened dialog window select this - http://prntscr.com/6ftiqg
3. Click Ok
4. Then after page refresh - http://prntscr.com/6ftiwc

#13

I am able to annotate once and then not again. See end of this message for details.

The layouts folder is the correct place and in my 6 years of SharePoint development I have used extensively.

The problem is that the syntax

url:
‘/_layouts/15/GroupDocsAnnotation/GroupDocsAnnotation.aspx?items=’ +
myItems + ‘&source=’ + SP.ListOperation.Selection.getSelectedList(),

only
allows for sharepoint libraries that are in the root web of the root
site collection (nor does it work for sites accessed by an alternative
access mapping), and will always produce a server relative url and not a
site relative url

eg: http://abc.com/library

The
problem is that any calls to SPContext.Current.Site ( and Web etc),
within the layouts page code, will always resolve to the root site
collection and not to the site collection (web) currently in use

Alos this server relative url will not work for a library in the root of a secondary site collection

eg: http://abc/sites/site01/library

and will not work for libraries in sub webs(sites) of either the root site collection or secondary site collections

eg:
http://abc.com/web/library
or
http://abc.com/sites/site01/web/library

the following syntax (amongst other solutions on the web) allows for these common implementations of sharepoint.

url:

SP.Utilities.Utility.getLayoutsPageUrl(‘GroupDocsAnnotation/GroupDocsAnnotation.aspx?items=’

  • myItems + ‘&source=’ +
    SP.ListOperation.Selection.getSelectedList()),

    There are token
    substitions available within sharepoint but are not applicable to modal
    dialog calls. see
    https://msdn.microsoft.com/en-us/library/office/ms431831.aspx


    I cannot understand the the signalR steps you detail, may be due to missing images on the forum page.


    Not
    sure How I got here but have removed and added each of the 3 groudpdocs
    supplied SignalR assemblies to and from the bin folder with many
    iisresets


    Now got the error
    Application error when access
    /_layouts/15/GroupDocsAnnotation/GroupDocsAnnotation.aspx, Error=The
    path is not valid. Check the directory for the database. [ Path =
    C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_Data\DB.sdf ]

    this
    path is not the path of my web application, most sharepoint farms have
    many web appliactions and hence many virtual directory folders within
    the IIS VirtualDirectories folder!!!

    so moved db.sdf to C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_Data<br>and gave everyone full control.

    having
    the db.sdf file within the App_Data folder is bad practice, but
    acceptable for sample implementations, as it will not work in load
    balanced scenarios, alternative access mapping scenarios etc.

    now i got the original error back
    System.ArgumentException:
    A route named ‘signalr.hubs’ is already in the route collection. Route
    names must be unique. Parameter name: name
    at System.Web.Routing.RouteCollection.Add(String name, RouteBase item)
    at

System.Web.Routing.RouteCollectionExtensions.MapOwinPath(RouteCollection
routes, String name, String pathBase, Action`1 startup)
at System.Web.Routing.SignalRRouteExtensions.MapHubs(RouteCollection routes, String path, HubConfiguration configuration)
at
Groupdocs.Web.Annotation.WidgetFactory.Initialize(HttpContext context,
String storagePath, String connectionString, Boolean useJsonRepo)
at GroupDocsAnnotation.Layouts.GroupDocsAnnotation.GroupDocsAnnotation.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Did an iisreset
now I am able to view and annotate a document
close the annotation dialog
try to annotate a second time (or open another document for annotations) get the error (in the ULS log)
System.ArgumentException: A route named ‘signalr.hubs’ is already in the route collection. Route names must be unique.

Any suggestions on what is missing or incorrect.


#14

Hello,


Thank you for the explanation, your advise for the URL was useful.

As for signalr issue - the reason of the issue is in the Initialize method. On each page load the GroupDocs.Annotation tried to initialize and if it was already you get an exception.

Currently our dev team woks on total rebuilding and refactoring of the GroupDocs products and in the brand new version we will take into account the possibility of checking if the library initialized or not.

Sorry for the inconvenience but we don’t have exact date when it will be ready but we will notify you.



#15

Hi,
Any update on launch? Did GroupDocs release the new version?

Thanks,
Bhavin


#16

Hi Bhavin


This is to let you know that next generation GroupDocs.Annotation for .NET 3.0.0 is in the release verification process and it may take a week or so to get it released. Like GroupDocs.Viewer for .NET 3.0.0, GroupDocs.Annotation for .NET 3.0.0 will also be a UI-less backend document processing API. In fact, all GroupDocs APIs starting version 3.0.0 will be UI-Agnostic and the related front ends will be open sourced so the users can contribute and fix any issues without waiting anyone. In summary, there are following advantages of this approach:

1) Our product teams will be focused only on back end document processing engine APIs so it is made stronger and stronger to deal with various document formats.

2) The front ends will be disintegrated from the back end document processing engine APIs and will be made open source. This will allow any developer(s) to contribute / fix any front end issues themselves instantly and over the time, front end will be much more improved.

3) Although the front ends will be open source, the GroupDocs Support Teams will keep maintaining and improving them. The public developer(s) will also be encouraged to contribute to improve the front end as mentioned in Point 2 above. This will ensure that front ends are also stable and in working condition all the time.

I hope I have clarified our plans and the respective advantages. In case of any further questions, please do let us know.

Many Thanks