Discussion:
IAddressee.GetFreeBusy returns null string
(too old to reply)
t***@gmail.com
2007-08-27 21:05:27 UTC
Permalink
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
};
Dgoldman [MSFT]
2007-09-03 02:49:46 UTC
Permalink
One thing I see is that you have some extra parameters in that function
call.

freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval, "", "", "",
"");
should look like this
freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval);

Also are you calling this from within the same domain?

I am not sure if you are using the ExchangeDistributionList anywhere in your
code but the ExchangeDistributionList object is derived from the
AddressEntry object. It inherits the GetFreeBusy method from the
AddressEntry object, and in the case of ExchangeDistributionList, regardless
of the values of the parameters, this method always returns Null.

This method does not return the free-busy information of individual members
of an ExchangeDistributionList. To obtain free-busy information for a
meeting request, send the request to individual users. Use the
AddressEntry.AddressEntryUserType property of the AddressEntry object
obtained from Recipient.AddressEntry to determine if a Recipient represents
an ExchangeDistributionList.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Dgoldman
http://blogs.msdn.com/dgoldman
Download OABInteg
(http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A2338E73-F521-4071-9B1D-AAF49C346ACD)
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();
// 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)
{
{
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
};
t***@gmail.com
2007-09-05 15:29:00 UTC
Permalink
Post by Dgoldman [MSFT]
One thing I see is that you have some extra parameters in that function
call.
freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval, "", "", "",
"");
should look like this
freebusy = iAddr.GetFreeBusy(dtStartDate, dtEndDate, interval);
Also are you calling this from within the same domain?
I am not sure if you are using the ExchangeDistributionList anywhere in your
code but the ExchangeDistributionList object is derived from the
AddressEntry object. It inherits the GetFreeBusy method from the
AddressEntry object, and in the case of ExchangeDistributionList, regardless
of the values of the parameters, this method always returns Null.
This method does not return the free-busy information of individual members
of an ExchangeDistributionList. To obtain free-busy information for a
meeting request, send the request to individual users. Use the
AddressEntry.AddressEntryUserType property of the AddressEntry object
obtained from Recipient.AddressEntry to determine if a Recipient represents
an ExchangeDistributionList.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Dgoldmanhttp://blogs.msdn.com/dgoldman
Download OABInteg
(http://gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=A...)
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();
// 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)
{
{
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
};- Hide quoted text -
- Show quoted text -
Thanks for the response. I am not using distribution lists. The code
is running on the Exchange server, which in our test environment is
also the domain control. I receive compiler errors when all parameters
are not provided.

s

Loading...