Hello,
I am trying to add a file to Vault Professional 2014 using C# as development language. This is my below section of code. Though the code does not produce any error but still i am getting exception SOAP Exception 8000.
Can some body please suggest me where am i going wrong..
using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
ByteArray fileData = new ByteArray();
fileData.Bytes = new byte[stream.Length];
stream.Read(fileData.Bytes, 0, fileData.Bytes.Length);
mgr.DocumentService.AddUploadedFile(Folder2,System.IO.Path.GetFileName(filePath), "", System.IO.File.GetLastWriteTime(filePath), null, null, FileClassification.None, false, fileData);
}
Solved! Go to Solution.
Solved by Redmond.D. Go to Solution.
See http://justonesandzeros.typepad.com/blog/2013/07/file-transfer-doing-it-the-hard-way.html
-Dave
The easy way of doing it is to use Connection.FileManager.AddFile()
Thank you Dave for providing a link to add file i will surely use this for other projects.
Thanks for your reply.
Thank you Doug, for providing solution. Actually the concept which you explained worked in my case as we were instructed not to cross 'N' number of lines in code hence i used connection.filemanager.addfile.
Thank you Doug, Thank you Dave for providing guidance.
rgds
Amit