cancel
Showing results for 
Search instead for 
Did you mean: 

StoreDocument(PageData, DocumentProperties) Times out from time to time

Ryan_Wilson2
Star Contributor
Star Contributor

When making subsequent calls to StoreDocument(PageData, DocumentProperties) it seems to time out on the call to StoreNewDocument. I am having a hard time figuring out what is causing this problem. Has anyone else experienced this issue and if so, what did you do to resolve it?

 

 try                {                    //New Document object which will be created on successful upload of document to the OnBase system                    Hyland.Unity.Document newDoc = null;                    //Get the Hyland document type object from the document upload document type property                     Hyland.Unity.DocumentType docType = _application.Core.DocumentTypes.Find(upload.DocumentType);                    //Create a memory stream for writing the upload to a stream and pass to PageData object of Hyland.Core.Storage.CreatePageData                    using (System.IO.MemoryStream ms = new System.IO.MemoryStream())                    {                        //Write the uploaded file's contents to the memory stream                        ms.Write(upload.File, 0, upload.File.Length);                        //If you don't reset the position of the memory stream to zero, the call to upload the document will fail -5/22/19- -RW-                        ms.Position = 0;                        using (Hyland.Unity.PageData pageData = _application.Core.Storage.CreatePageData(ms, upload.FileExtension)) //The file extension of the upload may not be kosher with the method, have to double check this                        {                            //May have to revisit this one as we are using the file extension to find the file type...TODO                            Hyland.Unity.FileType fileType = _application.Core.FileTypes.Find(upload.FileExtension.Replace(".", ""));                            //docType should never be null as the user should only be selecting available document types when uploading                            Hyland.Unity.StoreNewDocumentProperties docProps = _application.Core.Storage.CreateStoreNewDocumentProperties(docType, fileType);                            //Cycle through the keyword types and values and add to the document properties                            //Double check to make sure this works and has all keywords saved with document correctly.                            foreach (KeyValuePair<string, string> keyword in upload.KeywordTypesAndValues)                            {                                //docProps.AddKeyword(keyword.Key, keyword.Value);                                AddDocProps(ref docProps, keyword.Key, keyword.Value, docType.Name).Wait();                            }                            //Get the new document from OnBase system                            newDoc = _application.Core.Storage.StoreNewDocument(pageData, docProps);                        }                    }
2 REPLIES 2

Shane_Cook1
Star Contributor
Star Contributor

Hi,

I have some related experience, but my guess at root cause may not be the same as your cause. Most of the issues I encountered were related to the size of the document being archived (read as LARGE files).  The app server may have some settings for timeout and/or max file size that may appear random but are actually related to the larger files being archived.

I hope this solves your issue or at least helps get a couple of possible causes off the list.

Shane

This may indeed be related to the file size. Did you modify a web.config on the app server for OnBase to accept larger files??? I know the exception I get when this happens is Request Timeout, so it is possible that a large file is causing some kind of exception.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.