By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

Help - need to extract boundary separated multi-part data from HttpRequest

P: n/a
I'm trying to setup an ASPX web page to service requests from an
existing Java Client that posts multi-part data as a way to upload
files, and I can't find a straightforward way to process the request.
From the HttpRequest, the Request.Form and Request.Files collections

are empty. The Request.ContentType states the following:

multipart/form-data, boundary=012AhbCfFg225929

and using the Request.InputStream to get the content results in the
following string:

-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.arch"\r\n\r\nx86\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionProcessorVersion"\r\n\r\n01.019.0 513\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="User_ID"\r\n\r\ncustomer\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="agentVersion"\r\n\r\n1.2.2\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="java.version"\r\n\r\n1.3.1_03\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Order_Filename"\r\n\r\nTSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="Full_Filename"\r\n\r\nC:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionAction"\r\n\r\nspotOrderUpload\r\ n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Time"\r\n\r\n12:00:14\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Date"\r\n\r\n2006/02/07\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="os.name"\r\n\r\nWindows
2000\r\n-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.version"\r\n\r\n5.1\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Password"\r\n\r\npassword\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Size"\r\n\r\n961\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="file0"; filename="C:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST"\r\nContent-Type:
application/pdf\r\n\r\n"SYS",1,11/11/2005 3:15:05
PM,TSTFILE.TST,1,2,,,,,,,,,,,,,,\r\n"CUS",21,"Joe
User",1,,,,,,,,,,,,,,,,\r\n"ADV",TEST,1,(CNC)
TEST,"TEST",TEST,"Joe","User",TST
TEST,"781-898-6500",,,DODGE,,,,,,"TEST","TEST"\r\n"ORD",0,0,,"3" ,"1",,0,,,,,,,,,,,,\r\n"MED",2,"NUM-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","1",,,,\r\n"MED",2,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-1",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-2",,,"0",,,,,,,,,,,,,,\r\n"ORD",0,0,,"2","1",,0,,, ,,,,,,,,,\r\n"MED",3,"SPOT-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"MED",3,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-3",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-4",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-5",,,"0",,,,,,,,,,,,,,\r\n\r\n-----012AhbCfFg225929-----
I could write code to manually parse this string to extract the values
and the uploaded file content, but I was hoping that there was a more
straightforward way, and changing the existing Java client is not an
option Any suggestions would be appreciated.

Thanks in advance

Apr 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Also, I'm using .NET Framework 1.1. If anyone has a suggestion on the
best way to extract the data values from this request, I would be very
grateful.

Thanks in advance

Apr 29 '06 #2

P: n/a
One final check to see if anyone has a suggestion for this issue.

Thanks

May 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.