Library tutorials & articles
Accessing Hotmail using C#
By Wouter van Vugt, published on 28 Feb 2004
Page 2 of 5
- Introduction
- Building the Client
- HotmailProxy
- HotmailClient
- HotmailClient contd.
Building the Client
To build the client two components need to be created:
- A proxy that is able to ‘speak' Httpmail and is able to do HTTP authentication as described in the RFC.
- The actual client that accesses Hotmail via the proxy and uses
XPathfor parsing of the responses.
Instead of building a custom proxy another method could be used. Microsoft ships a component called XmlHttp that is able to make XML based HTTP requests. The use of this class presented several problems:
- A request for a limited amount of properties, such as the msgfolderroot, returns all the possible responses for that request. So a query to obtain only the msgfolderroot would return information about all the mailboxes. This isn't fatal of course but it does show that the class could use some work. The proxy class that is built in this document does not show this problem.
- The component generates weird looking HTTP packets. For instance, the query is placed in the HTTP headers, it should be sent as a data section. This will probably result in erroneous server responses, and may be causing problem 1.
- Most importantly; the component will not work for some email addresses, while the only configuration that can be made is the username and password. This problem is the biggest show-stopper when using
XmlHttp.
Before reading the rest of this document; I assume that you have basic knowledge of the following subjects:
-
HttpMail -
XPath - Basic C#
- Cookies
Please note that the code is fully documented in the source files.
Related articles
Related discussion
-
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
by virtualking (0 replies)
-
How to optimize mysql subquery performance?
by Jayaram P (0 replies)
-
C# video Editing/rendering
by pkuchaliya (0 replies)
-
How to Fill DataSet with more records (around 1 lakh) in a faster way
by Jayaram P (0 replies)
-
Can't print on the network with MSADESS ??
by anatha1 (2 replies)
Related podcasts
-
Object-Oriented Programming in Ruby
In this episode, I talk with Scott Bellware about object-oriented programming in Ruby, and Ruby's object model. This is taken from a private conversation, and the audio quality suffers at times. Much thanks to Scott for allowing this to be released.This episode of the Alt.NET Podcast is bro...
Thx!
Tidoy
Hi,
I tried running this code as it would have been nice to develop my own hotmail client, however on running it does say Error 402 Payment Requred, on some research it does look like to you have to be a paying member of the hotmail service ($19 annually i think) to be able to use these set of objects.
Shame.
This thread is for discussions of Accessing Hotmail using C#.