473,781 Members | 2,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.as px
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: ------------Ij5gL6ae0Ij5ei4 gL6KM7ae0gL6Ij5
Body: Content-Disposition: form-data; name="projectId "
Body:
Body: 159
Body: ------------Ij5gL6ae0Ij5ei4 gL6KM7ae0gL6Ij5
Body: Content-Disposition: form-data; name="sessionId "
Body:
Body: wq3zlprijum1q45 5wwv53kq2

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.as px
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 1229

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

Similar topics

2
2367
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 encoded version. I want to send the following: "http://10.0.1.1/axis-cgi/io/output.cgi?action=1:\" But I get: "http://10.0.1.1/axis-cgi/io/output.cgi?action=1:%5c" in the web
5
3236
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 message, and to also compress the response (GZIP). The mod_deflate filter requires the 'Content-Length' header contained within the incoming request to specify the number of UNCOMPRESSED bytes being sent and not the actual bytes of the body of the...
3
7059
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 = s & " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" s = s & " <soap:operation soapAction='urn:Example1/HelloWorld' style='document' />" s = s & " <soap:Body> <HelloWorld xmlns='urn:Example1'> <name>Mark</name> </HelloWorld> </soap:Body>...
9
7675
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 and cookies are not being sent along with the header and post data. here is the code im using. Can anyone please tell me why this is happening? I do not want to go back to using VB6 and the inet control!!! If you notice in my class below, i...
2
1721
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 created empty, so I need to populate its headers in order to send cookies for authentication purposes. This is the code fragment: ....
3
2000
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: Mypage.aspx?Password=Mypassword When this request hits the page, I need to pull that variable Mypassword to use in my VB function to query the database. I'm confused on how to get it. I tried using
4
1643
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 IIS servers. Put in another way, can I send a datastring to another web-app without having the IE client expecting a post back from that server? Best regards, Christina
4
12712
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 advices but still having troubles... it might some obvious error that I am making but I just dont see it. ==================FIRST - Webclient=================================
0
1532
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 send a request to remote application. --------------------------------------------------------------------------------------------------------------- string lcUrl = "http://localhost/check/WebSite3/Default.aspx"; HttpWebRequest loHttp...
0
9636
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
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
9931
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...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
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...
2
3632
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.