473,499 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpWebRequest POST not working

Hi there,

I have an application that posts data to the canadapost.ca website to
retrieve postal codes. This was working for quite some time until this
week when Canada Post changed their website. Now it no longer works.
Here is the code snippet:

Const CANADA_POST_URL As String =
"http://www.canadapost.ca/tools/pcl/bin/cp_search_response-e.asp"

' Create the web request.
objWebRequest =
CType(System.Net.WebRequest.Create(CANADA_POST_URL ),
System.Net.HttpWebRequest)
objWebRequest.Method = "POST"
objWebRequest.ContentType =
"application/x-www-form-urlencoded"
objWebRequest.ContentLength = aPostData.Length

' Write the post data.
objStream = objWebRequest.GetRequestStream()
objStream.Write(aPostData, 0, aPostData.Length)
objStream.Close()

Anyone know how I can post to their website now?
Thanks!

Nov 29 '06 #1
0 908

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

Similar topics

0
3197
by: Limey | last post by:
We are working with a vendor who is trying to post some some XML data to us. They are using an ASPX script to post to a PHP page of ours. The problem is that in the PHP page, I cannot find any...
9
8148
by: Mike Cronin via DotNetMonster.com | last post by:
Hi there, Can anyone tell me what level of encryption is used when making an HTTPS POST request through an instance of the System.Net.HttpWebRequest object? Thanks much in advance! Mike...
3
15723
by: ME | last post by:
Hi; I am getting "Unhandled Exception: System.Net.WebException: The remote server returned an erro r: (401) Unauthorized." when I am trying to get a page via post. Code follows...
0
9188
by: Peter Qian | last post by:
Hi, I'm working on a windows form based program that can log into a web service (Apache based, https is used for auth). I was able to post the login data and obtain a sessionID. However I'm not...
2
4799
by: Keith Patrick | last post by:
I'm trying to programmatically post data to another page within my ASP.Net app. Not POSTing is not an option (I can't store this data in my session, context, hidden fields, or anything else...I've...
1
2584
by: sfoxover | last post by:
Hi, Could someone please give me some suggestions on how to make this class robust. I need to be able to handle around 20 similtanious requests to this class which causes a web browser to...
6
8736
by: James MA | last post by:
I'm now writing a small program to communicate a web server to simulate a web client. I use te httpwebrequest to talk with the server, and it works find for "POST" method, however, when i test...
3
4888
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
1
3538
by: Steve | last post by:
Hi all, I'm using the HttpWebRequest class to POST a form to a partner site. Communication with the "Partner" site admin is shoddy at best and I'm having a hard time determining if the POST is...
0
1412
by: calebmeii | last post by:
Hi, Anyone's help is really appreciated! VS05 with .net 2.0, on Windows XP/2003 IIS 5/6, on ASP, When post a HttpWebRequest with client ceritificate X509Certificate cert =...
0
7132
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
7009
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
7178
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,...
0
7390
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...
0
4602
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...
0
3103
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...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
1
665
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.