By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

How to open a File from password protected shared server through programming

P: 2
I tried to write a program that can open files from the server. But the shared folder in the Win2003 server is password protected. i tried the following code

System.Diagnostics.Process.Start("net.exe", "use K: \\Server\URI\path\here /USER:username password" )

Dim p = New System.Diagnostics.Process
p.Start("k:\" & Filename)

System.Diagnostics.Process.Start("net.exe", "use /delete K:" )

And it is working fine. But for big files and pdf files it opening and it is showing the File not found error. I know the problem is caused because the network drive deleting after opening the file. I tried to increase the delay to deletion of network drive. and somewhat success. except pdf file other files are working fine. PDF files still showing path not found after load all file also. I think it communicating the path after opening also. But some security reason I can't keep the network folder map.

So I wish to open the file in some otherway that can't bring any further problem.

Please help me in this matter. this is urgent.

Thanks
Jun 6 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.