Click here to Skip to main content
16,014,294 members
Home / Discussions / Web Development
   

Web Development

 
GeneralFile permissions Pin
Todd Smith30-Jul-02 8:21
Todd Smith30-Jul-02 8:21 
GeneralRe: File permissions Pin
Mazdak30-Jul-02 8:46
Mazdak30-Jul-02 8:46 
QuestionRemote Scripting Hosed by JRE International? Pin
DVryce30-Jul-02 5:48
DVryce30-Jul-02 5:48 
AnswerRe: Remote Scripting Hosed by JRE International? Pin
Jello30-Jul-02 22:27
Jello30-Jul-02 22:27 
GeneralApache and ASP.NET Pin
Kevin McFarlane30-Jul-02 0:04
Kevin McFarlane30-Jul-02 0:04 
QuestionHow to create address book? Pin
mizz-isLa29-Jul-02 21:25
sussmizz-isLa29-Jul-02 21:25 
AnswerRe: How to create address book? Pin
Nick Parker30-Jul-02 17:25
protectorNick Parker30-Jul-02 17:25 
GeneralHtmlInputFile InputStream woes Pin
29-Jul-02 13:44
suss29-Jul-02 13:44 
I thought I would just put together a quick page in ASP.NET to replace the old one I have written in ASP that uses the Dundas control.

Anyway, nice and easy, especially with the articles on this site, 10 minutes I have an upload/Download page and a database (SQL2000)

My only problem is it does not work Wink | ;-)

I have the following code where theFile is a HttpPostedFile object.

1: byte[] myData = new byte[theFile.ContentLength];             <br />
2: theFile.SaveAs (@"c:\test.jpg") ;  //For testing only<br />
3: theFile.InputStream.Read(myData, 0, theFile.ContentLength);<br />
4: dbRow["FileData"] = myData ;


Now, line 2 works fine and I can see the picture saved onto my hard disk, but line 3 does not, the myData array remains full of zeros, but it is set to the correct size in line 1.

What started as a 15 minute job is now taking hours.

Anyone else seen this problem or know what I am doing wrong here?

Thanks

Stephen.
GeneralRe: HtmlInputFile InputStream woes Pin
stephen woolhead30-Jul-02 13:14
stephen woolhead30-Jul-02 13:14 
GeneralOld version of files "cached" into memory Pin
Chris LaQuerre29-Jul-02 4:02
Chris LaQuerre29-Jul-02 4:02 
GeneralRe: Old version of files "cached" into memory Pin
Alexandru Savescu29-Jul-02 5:29
Alexandru Savescu29-Jul-02 5:29 
GeneralRe: Old version of files "cached" into memory Pin
Chris LaQuerre29-Jul-02 7:02
Chris LaQuerre29-Jul-02 7:02 
GeneralProblems with layers in Netscape 4 Pin
Hitu28-Jul-02 21:13
Hitu28-Jul-02 21:13 
GeneralRe: Problems with layers in Netscape 4 Pin
Paul Watson28-Jul-02 21:25
sitebuilderPaul Watson28-Jul-02 21:25 
GeneralRe: Problems with layers in Netscape 4 Pin
Hitu28-Jul-02 22:58
Hitu28-Jul-02 22:58 
Generalhelp needed...!!! Pin
drmzunlimited28-Jul-02 3:53
drmzunlimited28-Jul-02 3:53 
GeneralRe: help needed...!!! Pin
Colin Leitner28-Jul-02 8:11
Colin Leitner28-Jul-02 8:11 
GeneralRe: help needed...!!! Pin
Paul Watson28-Jul-02 21:27
sitebuilderPaul Watson28-Jul-02 21:27 
GeneralRe: help needed...!!! Pin
SimonS28-Jul-02 21:50
SimonS28-Jul-02 21:50 
GeneralRe: help needed...!!! Pin
Colin Leitner28-Jul-02 23:04
Colin Leitner28-Jul-02 23:04 
QuestionFile Manager in ASP?? Pin
dannytired26-Jul-02 6:13
sussdannytired26-Jul-02 6:13 
AnswerRe: File Manager in ASP?? Pin
Philip Patrick26-Jul-02 23:34
professionalPhilip Patrick26-Jul-02 23:34 
Generalrot N encryption using Javascript Pin
'Anil' Radhakrishna25-Jul-02 19:48
'Anil' Radhakrishna25-Jul-02 19:48 
GeneralRe: rot N encryption using Javascript Pin
Colin Leitner26-Jul-02 2:43
Colin Leitner26-Jul-02 2:43 
GeneralRe: rot N encryption using Javascript Pin
alex.barylski26-Jul-02 7:41
alex.barylski26-Jul-02 7:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.