Hello,
as we use a remote share (virtual dir on iis) to store files, we need a workaround to substitute the standard call like:
private void button1_Click(object sender, EventArgs e)
{
this.docViewer.FileSource = “Files/word_sample.doc”;
}
we tried instead this:
private void button4_Click(object sender, EventArgs e)
{
string sFile = sUploadpfad + “\\word_sample.doc” ;
using (Stream s = new FileStream(sFile, FileMode.Open))
{
docViewer.FileStream = s;
}
}
unfortunately it does not work. I must explain, that this is running on an iis which is accessible from outside.
Any idea what we can do, to get this working?
Regards
Johann
Problem Solved.
It works only with Temp files. That means, I have to copy a file from remote share to the IIS app dir and from there it is accessible for the viewer.
To avoid the copying in future I would request a feature, to do this with a file or memory stream – what is not working at the moment.
Regards
Johann
Hi Johann,
I think this fails because your stream is disposed before it can be used by the docViewer.
Try using a memory stream or a temporary file instead.
Best regards
Frank
Please login first to submit.