Free Support Forum -

GetDocumentHtml 403 FORBIDDEN - SharePoint ViewerModernWebPart

I am using version 20.4. and SharePoint 2013. I am getting the same error for GetDocumentHtml -> Gethandler.GetPages(filename, options). Hoping for your immediate assistance

This is okay now thanks God. I found resolution for this through another post here. Adding UseCache = true in the code below solved the issue.

ViewerConfig cfg = new ViewerConfig
StoragePath = _storagePath,
CachePath = _cachePath,
//UseCache = false
UseCache = true

1 Like


Good to know that your issue is resolved.