WebDav+ Exchange 2003
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
WebDav+ Exchange 2003

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Ser_P



Joined: 17 Oct 2006
Posts: 1

Posted: Tue Oct 17, 2006 2:04 pm    Post subject: WebDav+ Exchange 2003 Reply with quote

Hi, all.


In work-time with Exchange Server 2003 with WebDAV we found next strange bug:


sometimes, this code (uses for get a localized name of the Inbox folder) launched from the same with Exchange domain



System.Net.ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();

strBody = "<?xml version='1.0' encoding='utf-8'?>";

strBody += "<a:propfind xmlns:a='DAV:' xmlns:h='urn:schemas:httpmail:'>";

strBody += "<a:prop><h:inbox/></a:prop></a:propfind>";



Request = (System.Net.HttpWebRequest)HttpWebRequest.Create(mailboxRoot);

Request.Credentials = new NetworkCredential(LinkageSystemUserName, LinkageSystemUserPass, ExchangeServerDomain);

Request.Method = "PROPFIND";

Request.PreAuthenticate = true;

Request.ServicePoint.Expect100Continue = false;

Request.ServicePoint.UseNagleAlgorithm = false;

bytes = System.Text.Encoding.UTF8.GetBytes(strBody);

Request.ContentLength = bytes.Length;

RequestStream = Request.GetRequestStream();

RequestStream.Write(bytes, 0, bytes.Length);

RequestStream.Close();

Request.ContentType = "text/xml";

Request.Headers.Add("Depth", "0");

Response = (HttpWebResponse)Request.GetResponse();



Stream ReceiveStream = Response.GetResponseStream();

System.Text.Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

StreamReader sr = new StreamReader(ReceiveStream, encode);

string XmlData = sr.ReadToEnd();

ReceiveStream.Close();

sr.Close();

Response.Close();



works only one time, on all next times server returns (400) Bad request (this continue ~10 minutes, after this it again works one time).

If we launch this code from another domain all working fine.

Back to top
View user's profile Send private message Send e-mail
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB