Bonjour, j'essaye de me connecter sur hotmail en utilisant le protocle http. Une exception est levée "Accès refusé".

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
try
{
  XMLHTTP xmlHttp_ = new XMLHTTP();
  string serverUrl = " http://services.msn.com/svcs/hotmail/httpmail.asp ";
 
  // Build the query.
  string folderQuery = null;
  folderQuery += "<?xml version='1.0'?><D:propfind xmlns:D='DAV:' ";
  folderQuery += "xmlns:h='http://schemas.microsoft.com/hotmail/' ";
  folderQuery += "xmlns:hm='urn:schemas:httpmail:'>";
  folderQuery += "<D:prop><hm:inbox/></D:prop>";
  folderQuery += "</D:propfind>";
  xmlHttp_.open("PROPFIND", serverUrl, false, "test@msn.com", "test");
  // Send the request.
  xmlHttp_.setRequestHeader("PROPFIND", folderQuery);
  xmlHttp_.send(null);
  string folderList = xmlHttp_.responseText;
  Console.WriteLine("folderList : {0}", folderList);
 }
 catch (Exception e)
 {
   Console.WriteLine(e.Message);
 }
Je ne comprends pas, j'ai réussi à tester le protocole http sur ce compte avec thunderbird et ça fonctionne.