Free Support Forum -

View documents from SQL server using C# .NET

Hello -

I have a website that is running off Sitefinity CMS, meaning all of my documents are stored in a SQL Server database. I have successfully setup a test version of the viewer on my site. I created a test ViewerFiles folder and added a few files to it. I can successfully view any files placed in this folder in the viever. If I however try to pass the viewer the path of a document residing my SQL Server DB it just loads forever.
Does the Viewer need to have a physical file location or am I doing something wrong?


Hello Amanda,

Thank you for your interest in GroupDocs. GroupDocs.Viewer for .NET supports documents that are stored in DB. You should get a document from your DB as a stream (System.IO.Stream) and pass this stream to the GroupDocs.Viewer.

How to do that you can investigate in the article “How to Use GroupDocs.Viewer with Streams in ASP.NET WebForms Projects” (