473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sending form headers to ASP.NET from HTTPWebRequest


[apologies for cross-posting this from the Dot.NET development group,
not sure which is more approriate]

Hi all, I'm having a strange problem where I need to build out form
variables in an HTTPWebRequest and send them to an aspx page for
processing. The page isn't recognizing the form variables at all, and
the only thing I can attribute it to is that when the call works, the
aspx page doesn't send a HTTP/1.1, Status Code = 100 response, i.e.
the calls go like this:

29 1109.853516 192.168.1.108 206.71.164.82 HTTP HTTP: Request, POST /
{serv}/CustomerFile.aspx
30 1109.853516 192.168.1.108 206.71.164.82 HTTP HTTP: HTTP Payload
where the form variables are contained within the initial Request
object:

Body: ------------Ij5gL6ae0Ij5ei4gL6KM7ae0gL6Ij5
Body: Content-Disposition: form-data; name="projectId"
Body:
Body: 159
Body: ------------Ij5gL6ae0Ij5ei4gL6KM7ae0gL6Ij5
Body: Content-Disposition: form-data; name="sessionId"
Body:
Body: wq3zlprijum1q455wwv53kq2

This is done through a Test aspx page that was made just to make sure
that the server was working. The problem is that I need to send a file
to the same aspx page from a desktop app, which means I have to build
out the HTTPWebRequest myself. That I can do fine, but the server
always responds to the initial request:

257 24.547852 JNOBLE srv.com HTTP HTTP: Request, POST /
{serv}/CustomerFile.aspx
258 24.638672 srv.com JNOBLE HTTP HTTP: Response, HTTP/1.1, Status
Code = 100
259 24.639649 JNOBLE srv.com HTTP HTTP: HTTP Payload
and the form variables are always sent in the second payload, in this
case the frame marked 259. The response from the server is always:
"projectId = 0 is unknown", which means that the server isn't getting
those form variables from the inital request, and hence is simply
ignoring them. Anyone know how I can append the form variables to the
initial request, instead of writing it later in the request stream?
I'm thinking that might be the problem but I could be wrong? Any info
or ideas would be greatly appreciated. Thanks so much,

Josh
Feb 12 '08 #1
0 1203

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

Similar topics

2
by: Carl Gilbert | last post by:
Hello! How can I make a web request without getting the url encoded. I want to make a request to a web server that takes "\" as part of the url but can't handle "%5C" which would be the url...
5
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming...
3
by: mark kurten | last post by:
I have a soap message that looks like this. s = s & " <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" s = s & " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" s =...
9
by: Michael Evanchik | last post by:
Hello all, since i wanted to use ssl and its seems easy to do so with this object. Im trying to login to a webserver (aol) for this example. But for some reason, im packet sniffing with ethreal...
2
by: Andres | last post by:
I am creating a web request (HttpWebRequest) from a web page in order to retrieve the Html from another page and embed it in the calling page. When you create a HttpWebRequest the request is...
3
by: Beryl Small | last post by:
Hi, I have a third party software that needs to send information to an .aspx page for processing to communicate with an SQL database. The software sends the information something like this: ...
4
by: Christina N | last post by:
What is the easiest way to make an ASP.Net application send data to another web-app? For instance I would like APP3 to log user stats from APP1 and APP2. The applications are located on different...
4
by: Natalia | last post by:
Hello, I need to provide the ability to post file and some form elements via our website (asp.net) to the third party website (asp page). On http://aspalliance.com/236#Page4 - I found great...
0
by: sanjaygupta11 | last post by:
I am using httpwebrequest and httpwebresponse objects for sending data to remote appication by post and receiving the response from there. I am using this code in my windows application which will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.