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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 21
Reputation: itshibu is an unknown quantity at this point 
Solved Threads: 0
itshibu itshibu is offline Offline
Newbie Poster

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

 
0
  #1
Jun 6th, 2009
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

  1. System.Diagnostics.Process.Start("net.exe", "use K: \\Server\URI\path\here /USER:username password" )
  2.  
  3. Dim p = New System.Diagnostics.Process
  4. p.Start("k:\" & Filename)
  5.  
  6. 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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC