473,412 Members | 2,088 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,412 software developers and data experts.

HttpWebRequest POST no longer working to Canada Post website

Hi there,

We 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 24 '06 #1
1 1807
Anyone?

le****@hotmail.com wrote:
Hi there,

We 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 28 '06 #2

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

Similar topics

9
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...
6
by: omyek | last post by:
I'm trying to mimic the browsing of a webpage using an HttpWebRequest. I've had a lot of luck with it so far, including logging into pages, posting form data, and even collecting and using cookies....
1
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...
3
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...
2
by: GHS | last post by:
I have some code to connect to a website and pull some content out of the HTML. I've verified that the 2 URLs I'm using are perfectly fine in Internet Explorer and both of them return results...
2
by: ReGex | last post by:
I have been working on a little project in C# to log into a website (using code inspired/riipped from http://www.codeproject.com/cs/internet/bloglivejournal.asp) but when I request the response,...
0
by: leeedw | last post by:
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...
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: barrybevel | last post by:
Hi, I'm trying to login to the www.vodafone.ie website using HttpWebRequest. It works fine with IE/Firefox and the .NET Web Control too, just not with my code. I think it's a redirect 302...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
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...
0
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
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,...
0
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...

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.