-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: KeangLoan
Message 1 in Discussion

I place a file field in my web application.. and select Run as Server Control and has 
the following code..        FileStream InFile;
    byte[] BinaryData;
    string full_name = System.IO.Path.GetFullPath(File1.PostedFile.FileName);
    InFile = new FileStream(full_name,FileMode.Open,FileAccess.Read);
    BinaryData = new byte[InFile.Length];
    InFile.Read(BinaryData, 0, (int)InFile.Length);
    InFile.Close();   But when a client PC try to browse a file and click on the 
button which contain these code.. it always come out with    Exception Details: 
System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\Documents 
and Settings\User\Desktop\snow.html".

&& 
Exception Details: System.IO.FileNotFoundException: Could not find file "C:\Documents 
and Settings\Administrator\Desktop\Class Type12.rtf". 
Is it because i let the FileField run on server?? so that only i test on my pc it 
work... then if my pc dun have the file then it failed?? 
but without running at server.. how can i get the file name?? 
any way to solve this problem?? please help me.. =) 
Thanks A Lot 
Regards,
KeangLoan

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to