Hi!
I am attempting to save a Aspose.Words document created by my website to a mapped Novell network drive and I keep getting the error message:
Could not find part of the path ‘U:\mynetworkfolder\mydocument.doc’
U: is the mapped drive letter of the Novell drive I am trying to save my document to. The web server is logged on to the Novell network and it can definitely see the mapped U: drive. It shows up in the list of mapped drives in the My Computer window.
But whether I run the web site locally on the web server or from a client computer, whenever it tries to save the document, I get the error message.
The code I’m using to do this is:
Dim doc As Document = New Document(“document1.doc”) <== document1.doc resides locally on web site
.
.
.
— insert some text at bookmarks
.
.
.
doc.Save(“U:\mynetworkfolder\mydocument.doc”, SaveFormat.Doc)
The actual error I receive is:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path ‘U:\mynetworkfolder\mydocument.doc’.
Source Error:
Line 62:
Line 63: doc.Save("U:\mynetworkfolder\mydocument.doc", SaveFormat.Doc)
Line 64: doc.Save(strFileKey & ".doc", SaveFormat.Doc, SaveType.OpenInBrowser, Response)
Line 65:
Source File: c:\inetpub\wwwroot\mywebsite\word_templates\word_popup.aspx.vb Line: 63
Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path 'U:\mynetworkfolder\mydocument.doc'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1971376
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998<br>` `System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +115
Aspose.Words.Document.Save(String fileName, SaveFormat fileFormat) +173
word_popup.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\mywebsite\word_templates\word_popup.aspx.vb:63
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
Any help you can give would be most appreciated!
Thanks very much!