I’m trying to create a file using:
Dim stmFile As Stream = File.Open(filename, FileMode.OpenOrCreate, FileAccess.Write)
This should create a file as the file specified does not currently exist however instead it throws a server error:
Could not find a part of the path 'c:\tempemail\681968_File.doc'.
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 'c:\tempemail\681968_File.doc'.
Any advice?
Try the following
tempemailexists