File.open file creation error

ExCon

New Member
I'm trying to create a file using:\[code\]Dim stmFile As Stream = File.Open(filename, FileMode.OpenOrCreate, FileAccess.Write)\[/code\]This should create a file as the file specified does not currently exist however instead it throws a server error:\[code\]Could not find a part of the path 'c:\tempemail\681968_File.doc'. Description: An unhandled exception occurred during the execution of the current webrequest. 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 'c:\tempemail\681968_File.doc'.\[/code\]Any advice?
 
Back
Top