none
The remote server returned an error: (440) Login Timeout.

    Question

  • Hi Everyone,
    I am trying to fetch an emails and put it to a Local folder.
    For this I am using WebDav.
    For fetching the information like Get All mailbox Info below is the code which give an error: at
    HttpWebResponse loResponse = (HttpWebResponse)request.GetResponse(); The remote server returned an error: (440) Login Timeout.

    Server name p_strServer:- https://webmail02/xyz.com

    public XmlDocument GetAllMailboxInfo()
    {
    XmlDocument loXmlDoc = new XmlDocument();
    string lsRootUri = p_strServer + "/Exchange/" + p_strAlias + "/Inbox";
    CredentialCache MyCredentialCache = new CredentialCache();
    MyCredentialCache.Add(new System.Uri(lsRootUri), "NTLM", new System.Net.NetworkCredential("Mail Username", "Mail Password"));

    CookieContainer cookiejar = new CookieContainer();
    byte[] buffer = GetFolderSizeRequest(lsRootUri);

    var request = (HttpWebRequest)WebRequest.Create(lsRootUri);

    request.Method = "SEARCH";
    request.ContentType = "text/xml";
    request.Credentials = MyCredentialCache;
    request.Headers.Add("Translate", "f");
    request.Headers.Add("Depth", "1");

    using (Stream stream = request.GetRequestStream())
    { stream.Write(buffer, 0, buffer.Length);}

    HttpWebResponse loResponse = (HttpWebResponse)request.GetResponse();
    Stream loResponseStream = loResponse.GetResponseStream();
    loXmlDoc.Load(loResponseStream);
    return loXmlDoc;
    }

    Wednesday, June 22, 2011 7:42 AM

All replies

  • Try to use the admin account and password to log in. Also double check the remote server, such as the address.

    at the end, try to change the level of server's security.

    Regards,

    Monday, June 27, 2011 6:14 AM