Free Support Forum - groupdocs.com

Annotations all marked as "Guest"


#1

Hello


When annotations are made to documents in our system they are all marked as “Guest”. Yet in the Page_Load method of the page I am calling:

svc.AddCollaborator(sItemId, Context.User.Identity.Name, firstName, lastName, null);

The firstName and lastName values are then found in the Users table in the DB.sdf database.

So am I missing something so the users names are added instead?

See screenshot here: http://screencast.com/t/l39khdja

Greetings
Robert Badi

#2

Hello Robert,

We are sorry to hear that you have this issue. You didn’t specify a version of used GroupDocs.Annotation, so we assume that you’re using the latest 1.8.0. We investigated the reported issues and were not able to reproduce them. Most likely, there are issues in the specific project. First of all, make sure that a user with “Context.User.Identity.Name” name doesn’t exist in the DB; if he already exists without specified first name and last name, specifying a “firstName” and “lastName” cannot help.

We recommend you to download a “GroupDocs.Annotation C# Demos” and investigate the projects - they show how to add annotations under specific account. For specifying a first name and a last name, open a “DocumentOpenSubscriber” class and specify corresponding first name and last name.

Thanks.


#3

Hi,


Sorry I forgot to mention the version, I am using 1.6.1.

Perhaps that’s the reason?

Greetings
Robert Badi

#4

Hello Robert,

Yes, it is the most likely, in light of that fact that I was unable to reproduce the reported issues. Please try to use the latest version 1.8.0. Of course, don’t forget to clean the database and file-sessions.json.

Thanks.


#5

Hi Denis


I have now looked very closely at the demo Groupdocs.Demo.Annotations.WebForms and I got the demo to work so that the username appears with comments instead of guest in the right comments pane. I did that by tweaking Default.aspx.cs and DeocumentOpenSubscriber.cs. I attach those files. It seems that the important change is to make sure the line System.Web.Security.Membership.ValidateUser(“robert@onsystems.is”, null); is in Default.aspx.cs.

I tried to replicate the change in our solution but I always get the error “No such reviewer” there. I replace the database file and delete the temp folder and json file and clear all cookies from the browser. I can not clean the solution as our project is a web site solution in VS2012 rather than an Web Application. Could that be an issue?

Hope you have ideas to solve this.