473,756 Members | 4,046 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

http form parsing problem...

Good morning. I am working on an issue that is just baffling me. I have
developed an .aspx page that receives an http form post that has a "file"
attribute.

When I do testing with a test post page, everything functions properly. When
the actual customer does the post, the attribute following the "file"
attribute is concatenated to the file itself. When I execute the
HttpPostedFile. SaveAs(), the resulting file is what is sent Plus the
following form attribute. This following attribute is not in any Collection
from the Request object.

Here is how I log the http post;

//Log the post sent
buf = new byte[Request.InputSt ream.Length];
Request.InputSt ream.Read(buf, 0, buf.Length);
char[] asciiChars = new char[Encoding.ASCII. GetCharCount(bu f, 0, buf.Length)];
Encoding.ASCII. GetChars(buf, 0, buf.Length, asciiChars, 0);
FileUtils.getIn stance().Log( "Stream:[" + new String(asciiCha rs) + "]");

This is the resulting log;

--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="from"

030353283
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="to"

TERMOMEXI
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="input-format"

x12
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="input-data";
filename="Proce ssLog.14404.log "
Content-Type: application/octet-stream

ISA*00* *00* *01*030353283 *01*TERMOMEXI
*050118*1546*U* 00304*000014407 *1*T*~
GS*CA*G865SQTS* TERMOMEXISQTS*0 50118*1546*0000 14407*X*003040
ST*865*00001440 7
BCA*00**1***050 118
DTM*102*****DT* 200501181546
N1*78**1*TERMOM EXI
N1*SJ**1*030353 283
POC*-1*OC******CR*A0 04F1*MN*T
DTM*007*****RD8 *20040930-20040930
SLN*1**I*20000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R2*1*R3*1*DK* N/A
PO3*ZZ*****1983 0.000000*BZ
N1*M2**29*30106 8
N1*MQ**29*33640 8
N1*DW**1*N/A
N1*US**1*N/A
SLN*2**I*15000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R2*1*R3*1*DK* N/A
PO3*ZZ*****1487 2.000000*BZ
N1*M2**29*EHR MC
N1*MQ**29*33640 8
N1*DW**1*N/A
N1*US**1*N/A
POC*-1*OC******CR*A0 04F1*MN*U
DTM*007*****RD8 *20040930-20040930
SLN*1**I*34702. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R3*1*DK*TEXTE ST*RR*N/A
N1*MQ**29*33640 8
N1*DW**1*TERMOM EXI
N1*US**1*N/A
SLN*2**I*15000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*A009 MC*R2*1*DK*N/A*RR*N/A
N1*M2**29*EHR MC
N1*DW**1*N/A
N1*US**1*067271 981
SLN*3**I*20000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*97HH *R2*1*DK*N/A*RR*N/A
N1*M2**29*30106 8
N1*DW**1*N/A
N1*US**1*067271 981
CTT*2
SE*000000040*00 0014407
GE*1*000014407
IEA*1*000014407
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="transacti on-set"

G865SQTS
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="batch-id"

23
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985--

But this is the file that is saved when I execute HttpPostedFile. SaveAs();

ISA*00* *00* *01*030353283 *01*TERMOMEXI
*050118*1546*U* 00304*000014407 *1*T*~
GS*CA*G865SQTS* TERMOMEXISQTS*0 50118*1546*0000 14407*X*003040
ST*865*00001440 7
BCA*00**1***050 118
DTM*102*****DT* 200501181546
N1*78**1*TERMOM EXI
N1*SJ**1*030353 283
POC*-1*OC******CR*A0 04F1*MN*T
DTM*007*****RD8 *20040930-20040930
SLN*1**I*20000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R2*1*R3*1*DK* N/A
PO3*ZZ*****1983 0.000000*BZ
N1*M2**29*30106 8
N1*MQ**29*33640 8
N1*DW**1*N/A
N1*US**1*N/A
SLN*2**I*15000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R2*1*R3*1*DK* N/A
PO3*ZZ*****1487 2.000000*BZ
N1*M2**29*EHR MC
N1*MQ**29*33640 8
N1*DW**1*N/A
N1*US**1*N/A
POC*-1*OC******CR*A0 04F1*MN*U
DTM*007*****RD8 *20040930-20040930
SLN*1**I*34702. 000000*BZ
SI*AP*TT*01*PG* Default*UK*N/A*R3*1*DK*TEXTE ST*RR*N/A
N1*MQ**29*33640 8
N1*DW**1*TERMOM EXI
N1*US**1*N/A
SLN*2**I*15000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*A009 MC*R2*1*DK*N/A*RR*N/A
N1*M2**29*EHR MC
N1*DW**1*N/A
N1*US**1*067271 981
SLN*3**I*20000. 000000*BZ
SI*AP*TT*01*PG* Default*UK*97HH *R2*1*DK*N/A*RR*N/A
N1*M2**29*30106 8
N1*DW**1*N/A
N1*US**1*067271 981
CTT*2
SE*000000040*00 0014407
GE*1*000014407
IEA*1*000014407
--------------CaminusWebExcha nge32MultiPartP OSTBoundary1106 091985
Content-disposition: form-data; name="transacti on-set"

G865SQTS
Notice that the form element "transactio n-set" is concatenated to the file.
This only occurs with the user's post, but not with my .aspx test post page.
Any ideas would help.

Dan Corkum

Nov 19 '05 #1
0 1115

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3793
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your HTML form to. the actual form-parsing page resides on a server that's uneditable to me since it sits on an inaccessible server. my problem is more irritating than anything; everything double-submits.. when you submit the form, I've forced a...
1
1510
by: Dan Corkum | last post by:
Good morning. I am working on an issue that is just baffling me. I have developed an .aspx page that receives an http form post that has a "file" attribute. When I do testing with a test post page, everything functions properly. When the actual customer does the post, the attribute following the "file" attribute is concatenated to the file itself. When I execute the HttpPostedFile.SaveAs(), the resulting file is what is sent Plus the...
4
1710
by: Philip Wagenaar | last post by:
I have made a form with a tab that containts groupboxes and those contain checkboxes. When I run the application sometimes the outlining for some groupboxes are not shown, if I switch tabs and back sometimes all outlining is shown and sometimes are not shown. I have no idea what is going wrong. What also is weird is that when I open the form from my main application I can resize the form, even though it is locked, and that when I cut...
2
1670
by: ano | last post by:
Hi all, I'm a C# newbie. My application contains several projects. One of project is Windows Form application. Others are a class library. My question is how to parsing messages from project A (class library) to show on a ListBox in project B (Windows Application)? How to make project A calls a ListBox in project B?
13
2094
by: simonp | last post by:
I am trying to use the basic http://user:password@example.com form for authentication inside a script. My only problem is my username contains the @ character (its an email address). As result, the url seems to be parsing incorrectly. Has anyone found a way around this problem? Cheers
10
10051
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to believe that this has to do with unreleased form component events or event handlers. I'm comparatively new to .net and windows forms, in the sense that though I've been using them for over 2 years now, it's been rather sporadic. I work with...
1
1887
imrosie
by: imrosie | last post by:
Hello (from Rosie the newbie), I recently got help with a wonderful event to perform this from 'thescripts'...it recognizes that a name is not in the list an allows for (after parsing first and last name) for the addition of the new FullName into the Customer table. I've been working on some other forms in this application and hadn't noticed until now a little problem. The event occurs in a 'search customer' form. You first search an...
1
3420
by: Rick Owen | last post by:
Greetings, I have a form that, when submitted, calls a plsql procedure. The form has a number of fields (text, hidden, select, radio) but the particular field that is giving me problems is a <selectwhich allows multiple selection. When I receive the form values in my procedure I getting only the first value of those that are selected. For example if I select 1000, 1100, 1200, 1300 in the list I only get 1000 in my procedure. If I...
12
2116
by: MikeB | last post by:
I created a small website for a friend. On this website he has a contact page where people can send him email. When I wrote this page I checked some tutorial pages and they warned about certain precautions to take to avoid spammers using the mail form to spam multiple people. I believe I did most of that, such as making sure that the header fields does not include multiple addresses, etc. Now it does seem some spammer has discovered...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3780
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.