Quantcast
Viewing all articles
Browse latest Browse all 26374

Exception of type 'Cobalt.ErrorException' was thrown while trying to read the contents of the file from doc library

Hi,

while trying to read the contents of the file from document library which resided in central administrartion site, An Exception of type 'Cobalt.ErrorException' was thrown.

I used the following code.

SPFile mappingFile = web.Folders["test"].Files["test.xml"];
Stream dataStream = mappingFile.OpenBinaryStream();
StreamReader reader = new StreamReader(dataStream);

I need help to fix this issue.

Thanks in advance


Viewing all articles
Browse latest Browse all 26374

Trending Articles