I have a WS in dev mode.  Means on my laptop.  

I am trying to put a pdf file into a byte[] so I can pass the byte back to a
client's call.  In debugger I see C:\Windows\System32\..... As the directory
I'm in


// look at this in debuger 
string file =@"~/Bulletin/"+FilePath+"/"+FileName; 
                
// Get that into an object
FileInfo fi=new FileInfo(file);       
                        

Fails all the time here
if (fi.Exists)
// Debug crud here
        {
                string ex1="";
        }                       
// Now use the file as intended
FileStream fs=fi.OpenRead();

int nBytes=  int.Parse( fs.Length.ToString());
byte[] ByteArray=new byte[nBytes];
int nBytesRead=fs.Read(ByteArray, 0, nBytes);
return ByteArray;
                        



Stephen Russell
S.R. & Associates
Memphis, TN 38115

901.246-0159 

http://spaces.msn.com/members/srussell/



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hlp8p3a/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1122650538/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to