Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 16th, 2006, 11:27 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default HTTP Module

Greetings everyone,
     I am working on an app where I deal with the Raw HTTP request, more specifically binary files that are sent via the HTTP Request. My question is a seemingly easy, although, I have read just about every RFC specification relating to this and every other related article I could find to no avail. My question is: What do binary files get encoded to when they are uploaded via HTTP?? I could have sworn that it was a base64 encode, however when I tried to use System.Convert.ToBase64String does not work and System.Convert.FromBase64Strig raises an exception about invalid Base64 characters in the string.

What im trying to do is grab this encoded string, code it back into a binary file and return it to the user, any ideas???

"The one language all programmers understand is profanity."
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
  #2 (permalink)  
Old March 21st, 2006, 10:23 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I solved this problem. If anyone couldn't tell I was working with a Raw Http Request (Raw in the sense that I pull it straight out of the HTTP Pipe b4 it has a chance to reach aspnet_wp.exe) the reason for this, if you have never noticed is that when you use the HTMLInputFile control to upload files, no matter the type of file you are uploading (jpg, gif, doc, exe) that ENTIRE file will get stored in the aspnet_wp.exe process on your server; normally this wouldnt be a problem but even after you save that file to disk, store it in a database, or whatever you are going to do with it, most of that file stays in memory.

The problem arises when you are uploading lots of files at one time, the worker process will automatically recycle itself after it has consumed 60% of system memory (unless you have adjusted the default setting) and this will cause your app to fail. The work around to this is to buy a third party component that streams the file directly to disk and bypasses loading it into the worker process or write your own.

I opted for the latter of the 2 and my above question was related to that; the answer to my question was that it isn't an encoding type, the characters that I was seeing where the character representation of my byte arrays (duh).


"The one language all programmers understand is profanity."
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
typing abc.com opens http://abc.com and not http:/ nrlahoti ASP.NET 2.0 Professional 1 February 6th, 2008 01:43 PM
Chapter 26 Simple HTTP Module Not Showing In Sourc geomar BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 August 25th, 2007 12:39 PM
http://mysite.com or http://www.mysite.com anshul HTML Code Clinic 1 December 27th, 2004 03:50 PM
http://domain or http://www.domain anshul HTML Code Clinic 9 August 11th, 2004 01:09 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM



All times are GMT -4. The time now is 07:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.