Free Support Forum - groupdocs.com

Database files generating in App_Data


#1

I’m pointing my web app to the MS SQL Server database, but I still get a database being created under App_Data with the following files generated at run-time: ASPNETDB.MDF, aspnetdb_log.ldf.


I’ve created the database tables from the sql scripts provided in the documentation.

I’m calling initialize, passing in the connection string

Groupdocs.Web.Annotation.WidgetFactory.Initialize(this.Context, @"~/App_Data", WebConfigurationManager.ConnectionStrings[“SaasposeDb”].

I’m not sure why it’s still created a brand new database in the file system, when I’m pointing it to the SQL database.

#2

Hello Stuart,

We are sorry to hear that you have this issue.

As I understand, you want to use an external SQL Server database, where all necessary tables are already created. In that case you need to make sure that your connection string points to the correct database.

Open an article “How to use GroupDocs Annotation for .NET with MSSQL Server” and find the connection string in the required format in the item 3. You should use it, just put the actual name of the SQL Server instance, database name, username and password. And that’s all.

Also, if you have a connection string, which is located in the web.config in the next format:



then there is no need to specify it in the “Groupdocs.Web.Annotation.WidgetFactory.Initialize” method as the third parameter - GroupDocs.Annotation will use it by default.

About the “ASPNETDB.MDF” - please check the other parts of your project, because GroupDocs.Annotation doesn’t create such database. It cannot create databases at all, only use them.

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


#3

Thanks, that did the trick. Still curious as to why GroupDocs needs to write the json and vs.bin files to the file system. This kind of architecture may not make sense everywhere and isn’t writing to the file system slow? Why can’t these two files be stored in the database as well?


#4

Hello Stuart,

This is very good and appropriate question.

vs.bin - this file is generated and used only if the GroupDocs.Annotation for .NET works in the trial mode. It holds a list of datetimes when the documents were opened, and using this file GroupDocs.Annotation doesn’t allow you to display/annotate more then 15 documents in an hour. When GroupDocs.Annotation works in full licensed mode, this file is not used.

file-sessions.json - this is much more interesting. Leo Barcenas several days ago raised the same question about this file: why it is used, what is its responsibility. I’ve answered here and here about the “file-sessions.json”; in order not to repeat myself I’m providing these links.

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