using System;
namespace WebDav
{
class Class1
{
public static void Main(String [] args)
{
try
{
MSXML2.XMLHTTP30 oXMLHttp = new MSXML2.XMLHTTP30();
// TODO: Replace with your new folder URL
String sUrl = "http://ExchServer/public/MyApplication/NewFolder";
// TODO: Replace the account and password
oXMLHttp.open("MKCOL", sUrl, false, @"UserDomain\UserAlias", "UserPassword");
String sQuery;
sQuery = "<?xml version='1.0'?>" +
"<a:propertyupdate xmlns:a='DAV:' " +
"xmlns:ex='http://schemas.microsoft.com/exchange/'>" +
"<a:set><a:prop>" +
"<ex:outlookfolderclass>IPF.Appointment</ex:outlookfolderclass>" +
"</a:prop></a:set>" +
"</a:propertyupdate>";
oXMLHttp.setRequestHeader("Content-Type", "text/xml");
Console.WriteLine(sQuery.Length);
oXMLHttp.send(sQuery);
Console.WriteLine(oXMLHttp.status);
Console.WriteLine(oXMLHttp.statusText);
Console.WriteLine(oXMLHttp.responseText);
}
catch (Exception e)
{
Console.WriteLine("{0} Exception caught.", e);
}
}
}
}