t***@gmail.com
2007-08-27 21:05:27 UTC
Hi,
I have a very simple application written in C#, using CDOEX v.
6.5.7638.1. I instantiate an Addressee object. Then call CheckName on
the object. I am then able to trace out the Addressee's properties, so
it is getting filled in during CheckName. Then I call GetFreeBusy and
it returns a null string. I have tried this when the state should have
been most conceivable combinations. All free, all busy, start free end
busy, start busy end free, free busy free, etc. I have pasted most of
the code below. I removed most of the extra stuff. I am running this
on the Exchange 2003 server. This is all the code, so am I missing
some initialization? Am I using improper LDAP string? Am I missing a
step? Thanks a lot for any suggestions.
CDO.Addressee iAddr = new CDO.Addressee();
iAddr.EmailAddress = txtEmail.Text; // ***@testdoma.local
// LDAP://testdoma.local usename and password are blank, using the
current user's credentials
bool bResolvedName = iAddr.CheckName("LDAP://" + txtDomain.Text, "",
"");
if (!bResolvedName)
{
throw new System.Exception("Error occured!");
}
CDO.CdoResolvedStatus status = iAddr.ResolvedStatus;
switch (status)
{
case CDO.CdoResolvedStatus.cdoResolved:
{
DateTime dtStartDate = new DateTime(DateTime.Now.Year,
DateTime.Now.Month, DateTime.Now.Day, 9, 30, 00);
dtStartDate = dtStartDate.AddDays(1);
DateTime dtEndDate = dtStartDate.AddHours(3);
int interval = 30;
// Get the free/busy status in Interval minute
// intervals from dtStartDate to dtEndDate.
freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval,
"", "", "", "");
}
break
};
I have a very simple application written in C#, using CDOEX v.
6.5.7638.1. I instantiate an Addressee object. Then call CheckName on
the object. I am then able to trace out the Addressee's properties, so
it is getting filled in during CheckName. Then I call GetFreeBusy and
it returns a null string. I have tried this when the state should have
been most conceivable combinations. All free, all busy, start free end
busy, start busy end free, free busy free, etc. I have pasted most of
the code below. I removed most of the extra stuff. I am running this
on the Exchange 2003 server. This is all the code, so am I missing
some initialization? Am I using improper LDAP string? Am I missing a
step? Thanks a lot for any suggestions.
CDO.Addressee iAddr = new CDO.Addressee();
iAddr.EmailAddress = txtEmail.Text; // ***@testdoma.local
// LDAP://testdoma.local usename and password are blank, using the
current user's credentials
bool bResolvedName = iAddr.CheckName("LDAP://" + txtDomain.Text, "",
"");
if (!bResolvedName)
{
throw new System.Exception("Error occured!");
}
CDO.CdoResolvedStatus status = iAddr.ResolvedStatus;
switch (status)
{
case CDO.CdoResolvedStatus.cdoResolved:
{
DateTime dtStartDate = new DateTime(DateTime.Now.Year,
DateTime.Now.Month, DateTime.Now.Day, 9, 30, 00);
dtStartDate = dtStartDate.AddDays(1);
DateTime dtEndDate = dtStartDate.AddHours(3);
int interval = 30;
// Get the free/busy status in Interval minute
// intervals from dtStartDate to dtEndDate.
freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval,
"", "", "", "");
}
break
};