Discussion:
exchange 2007 error 404 timeout
(too old to reply)
Felipe
2009-04-20 14:35:02 UTC
Permalink
I have an application for Exchange 2003 and when I try to run with Exchange
2007 does not connect, display 404 timeout error in the next code:

System.Net.WebResponse objResponse = objHttpReq.GetResponse();

in the Exchange 2007 server, I remove the certified and the mailbox is
accessed via http://

This is the complete code for the connection:

strSearch = "<?xml version=\"1.0\"?>";
strSearch += "<a:searchrequest xmlns:a=\"DAV:\">";
strSearch += "<sql> SELECT
\"urn:schemas:httpmail:from\",\"urn:schemas:httpmail:subject\",\"urn:schemas:httpmail:textdescription\",\"urn:schemas:httpmail:hasattachment\",
\"DAV:contentclass\",\"DAV:displayname\",\"DAV:href\"";
strSearch += "FROM Scope('SHALLOW TRAVERSAL OF \"\"') ";
strSearch += "Where \"DAV:isfolder\" = false AND
\"DAV:contentclass\" ";
strSearch += "= 'urn:content-classes:message' AND
\"DAV:ishidden\"=false";
strSearch += "</>";
strSearch += "</>";

System.Uri objUri = new Uri(Url);
System.Net.HttpWebRequest objHttpReq;
System.Net.CredentialCache objCredenciales = new
System.Net.CredentialCache();
objCredenciales.Add(objUri, "NTLM", new
System.Net.NetworkCredential(Usuario, ContraseƱa, Dominio));

objHttpReq =
(System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(objUri);
objHttpReq.Credentials = objCredenciales;
objHttpReq.Method = "SEARCH";
objHttpReq.ContentType = "text/xml";

byte[] objBytes = null;
objBytes = System.Text.Encoding.UTF8.GetBytes((string)strSearch);
objHttpReq.ContentLength = objBytes.Length;

System.IO.Stream objStreamRespuesta =
objHttpReq.GetRequestStream();
objStreamRespuesta.Write(objBytes, 0, objBytes.Length);
objStreamRespuesta.Close();

string strResultado = null;
try
{
System.Net.WebResponse objResponse = objHttpReq.GetResponse();
System.IO.Stream objXMLRespuesta =
objResponse.GetResponseStream();
System.IO.StreamReader objRespuesta = new
System.IO.StreamReader(objXMLRespuesta,
System.Text.Encoding.GetEncoding("utf-8"));
strResultado = objRespuesta.ReadToEnd();
}
catch { }

thanks for any cooperation
Lee Derbyshire [MVP]
2009-05-01 15:01:54 UTC
Permalink
Post by Felipe
I have an application for Exchange 2003 and when I try to run with Exchange
System.Net.WebResponse objResponse = objHttpReq.GetResponse();
in the Exchange 2007 server, I remove the certified and the mailbox is
accessed via http://
strSearch = "<?xml version=\"1.0\"?>";
strSearch += "<a:searchrequest xmlns:a=\"DAV:\">";
strSearch += "<sql> SELECT
\"urn:schemas:httpmail:from\",\"urn:schemas:httpmail:subject\",\"urn:schemas:httpmail:textdescription\",\"urn:schemas:httpmail:hasattachment\",
\"DAV:contentclass\",\"DAV:displayname\",\"DAV:href\"";
strSearch += "FROM Scope('SHALLOW TRAVERSAL OF \"\"') ";
strSearch += "Where \"DAV:isfolder\" = false AND
\"DAV:contentclass\" ";
strSearch += "= 'urn:content-classes:message' AND
\"DAV:ishidden\"=false";
strSearch += "</>";
strSearch += "</>";
System.Uri objUri = new Uri(Url);
System.Net.HttpWebRequest objHttpReq;
System.Net.CredentialCache objCredenciales = new
System.Net.CredentialCache();
objCredenciales.Add(objUri, "NTLM", new
System.Net.NetworkCredential(Usuario, ContraseƱa, Dominio));
objHttpReq =
(System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(objUri);
objHttpReq.Credentials = objCredenciales;
objHttpReq.Method = "SEARCH";
objHttpReq.ContentType = "text/xml";
byte[] objBytes = null;
objBytes =
System.Text.Encoding.UTF8.GetBytes((string)strSearch);
objHttpReq.ContentLength = objBytes.Length;
System.IO.Stream objStreamRespuesta =
objHttpReq.GetRequestStream();
objStreamRespuesta.Write(objBytes, 0, objBytes.Length);
objStreamRespuesta.Close();
string strResultado = null;
try
{
System.Net.WebResponse objResponse =
objHttpReq.GetResponse();
System.IO.Stream objXMLRespuesta =
objResponse.GetResponseStream();
System.IO.StreamReader objRespuesta = new
System.IO.StreamReader(objXMLRespuesta,
System.Text.Encoding.GetEncoding("utf-8"));
strResultado = objRespuesta.ReadToEnd();
}
catch { }
thanks for any cooperation
Do you mean 440 Login timeout (not 404)? In E2003, that usually meant that
you had FBA enabled on the Exchange VDir, but did not do the cookie auth
login. I'd guess it meant something similar in E2007.

Lee.
--
______________________________________

Outlook Web Access For PDA , OWA For WAP
www.leederbyshire.com
lee a.t leederbyshire d.o.t c.o.m
______________________________________
Loading...