I am moving the cmd line wrapping utility from DEV to QA, and I am facing a strange error. Of course, everything works fine on dev.
This is the code violation line:
byte[] fileBytes = sourceItem.File.OpenBinary();
"Unable to open file error." Internal exception shows COM code HResult: 0x81070211
I made sure that my account has owner rights to the library with which I am trying to extract this file. I even made myself a farm administrator, but I still get the same error.
I see that several other people have faced the same error, but no solutions. One post mentions downloading a file using code as a workaround - what would it look like?
I also see that some associate this problem with files> 100Kb and can be overcome by putting the assembly in the GAC. However, this will be problematic for this application.
Yes, I also tried using all the various parameter parameters. I also tried the workaround of just opening the stream using OpenBinaryStream, getting the length and reading the data into the byte [] array. The result is always the same. Something does not allow me to access the file to read in bytes - and the error message is simply useless.
Thanks to Advance for any help you can provide.
, Blob. , , > 100 . , db . , FileStreaming SQL Server, . DBA, . , . - - OpenBinary RBS?