What is the purpose of the file-sessions.json file?

What is the purpose of the file-sessions.json file in the App_Data folder?


If I delete it, it is regenerated. However, it’s causing headaches when added to source control because the contents are then moved to different branches and environments which reference different databases which may have different data.

This results in the following error:

ERROR Groupdocs.Core.Exceptions.GroupdocsCoreException: Unable to get entity: ID = 10013 —> System.Data.ObjectNotFoundException: An object with the specified EntityKey value could not be found.
at System.Data.Objects.ObjectContext.GetObjectByKey(EntityKey key)
at Groupdocs.Data.SaasposeDb.GetEntityByKey[TEntity](EntityKey key)
at Groupdocs.Data.EntitiesRepository`1.Get(Int64 id)

I don’t see the point of this file since deleting the contents of this file avoids this error and the file is regenerated if its missing.

Hello Jason,

“file-sessions.json” is tightly coupled with GroupDocs.Annotation for .NET and its database. It allows to support a lot of things and functions, to eliminate additional tables in the database and so on. It’s also used in Cloud version of Annotation. So right now it is impossible to get rid of it.

But we reviewed the problems that you had described and have answered here: Is the file-sessions.json file hard-coded to be in the App_Data folder?

If you will have more questions please feel free to contact us.