We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Open .doc from network path?

Good morning,

i'm experimenting with DocIO and i found a problem: the moment i try to open a .doc from a network path, my asp.net application just return a message "Storage could not open".
I get the path from a database and i'm trying to use something like:

Dim document As DLS.WordDocument = New DLS.WordDocument

document.Open(CStr(MyPath), FormatType.Doc)

And after that my application return that message.

There's a way to use mapping network path (like p:\blablabla\bla.doc) or absolute path (like \\my-server\bla.doc)?

Sorry for my bad english and thanks for reading. :)

3 Replies

MW Melba Winshia Syncfusion Team June 15, 2007 12:59 PM UTC

Hi Diego,

Thank you for your interest in Essential DocIO.

I tested by opening files from a network path and it seems to work fine. Could you please check the following?

1) Could you please check if you are able to open the file using the System.IO.FileStream

System.IO.FileStream fs = new System.IO.FileStream(CStr(MyPath),System.IO.FileMode.Open);

2) If not could you please check if the ASP.NET process has permissions to read from the network path?

Note:
----
1.Path names are limited to 248 characters
2.The specified path can also refer to a relative path or a Universal Naming Convention (UNC) path for a server and share name.
3.Ensure that your paths are well formed when using methods that accept a path string.
4.If you don’t have permission it will generate FileIOPermission exception.

Kindly let me know if the problem still exists.

Thanks,
Melba


AA AAA June 18, 2007 03:52 PM UTC

Hi Melba!

First of all thanks for your answer, very appreciated.

And finally i solved my problem: it was a permission problem, due to the fact that my was commented and was not intended to! :)

Anyway, it works fine with absolute path (ex. "\\serverx\filename.doc") but it doesn't work with mapped drive and the error is: "Impossibile trovare una parte del percorso Y:\file.doc."
Roughly traslated is: "A part of the path could not be found Y:\file.doc."

If you need the rest of the message tell me so i'll translate it for you.

Thanks for help, keep up the good work!


MW Melba Winshia Syncfusion Team June 19, 2007 10:56 AM UTC

Hi Diego,

Glad to hear that issue is resolved. However I was not able to reproduce any issues with mapped drive. I tested by opening files from mapped drive and it works fine. I think the problem is due to the path not being well formatted. Could you please let us know if you are able to open the file from the mapped drive using System.IO.FileStream?

System.IO.FileStream fs = new System.IO.FileStream("Y:\file.doc",System.IO.FileMode.Open);

This would help us to analyze this issue further.

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon