Link to home
Start Free TrialLog in
Avatar of vand3r
vand3r

asked on

CDO.Addressee.1 error 'c0070005' from GetFreeBusy(strStartTime, strEndTime, iInterval) in ASP page

I receive this CDO.Addressee.1 error 'c0070005' and can't find any information about it anywhere.  If anyone knows what this is refering to please help!

Here is my ASP code:

<%@ Language=VBscript%>
<%
    Sub PrintStatus(strStatus)
   Select Case strStatus
   Case "0"   'Free
      Response.Write "<TD>Free</TD></TR>"
   Case "1"   'Tentative
      Response.Write "<TD>Tentative</TD></TR>"
   Case "2"   'Busy
      Response.Write "<TD>Busy</TD></TR>"
   Case "3"   'Out Of Office

      Response.Write "<TD>Out Of Office</TD></TR>"
   End Select
    End Sub

    UserName = "myusername"
    DomainName = "mydomain.com"
    ServerName = "myserver"
    strStartTime = #11/6/2003 7:00:00 AM#
    strEndTime = #11/6/2003 5:00:00 PM#
    iInterval = 30

    Set iAddr = createobject("CDO.Addressee")
    iAddr.EmailAddress = UserName & "@" & DomainName
    iAddr.CheckName ("LDAP://" & ServerName)
      
    strFreebusy = iAddr.GetFreeBusy(strStartTime, strEndTime, iInterval)

    Response.Write "<Table Border =1>"
    For i = 1 To Len(strFreebusy)
   If i = 1 Then
      Response.Write "<TR><TD>Start Time</TD><TD>" & strStartTime & " ~ </TD>"
   Elseif i = len(strFreebusy) Then
      Response.Write "<TR><TD>End Time</TD><TD>" & strEndTime & " ~ </TD>"
   Else
      Response.Write "<TR><TD>.</TD><TD> + " & iInterval & " min ~ </TD>"
   End If
  Call PrintStatus(Mid(strFreebusy, i, 1))
    Next
    Response.Write "</TABLE>"
    Set iAddr = Nothing
%>
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Have you seen this?

http://support.microsoft.com/default.aspx?scid=%2fservicedesks%2fbin%2fkbsearch.asp%3fArticle%3d323915


It does not match what is happening to you, but it does seem to point to some sort of a permissions issue...


FtB
Avatar of vand3r
vand3r

ASKER

Thanks I checked those reg keys and the permissions are set properly.  Other ideas?
Apart from wondering about the permissions for the LDAP, I can offer only what I am sure that you already know--start with a simpler CDO sample, test it, and then add what you need one bit at a time until the error reveals its source. In case this helps, I am including an extended CDO example:

<%
Const cdoSendUsingMethod        = _
      "http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort          = 2
Const cdoSMTPServer             = _
      "http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort         = _
      "http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout  = _
      "http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate       = _
      "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic                  = 1
Const cdoSendUserName           = _
      "http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword           = _
      "http://schemas.microsoft.com/cdo/configuration/sendpassword"

Dim objConfig  ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields     ' As ADODB.Fields

' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields

' Set config fields we care about
With Fields
      .Item(cdoSendUsingMethod)       = cdoSendUsingPort
      .Item(cdoSMTPServer)            = "smtp_server_name"
      .Item(cdoSMTPServerPort)        = 25
      .Item(cdoSMTPConnectionTimeout) = 10
      .Item(cdoSMTPAuthenticate)      = cdoBasic
      .Item(cdoSendUserName)          = "username"
      .Item(cdoSendPassword)          = "password"

      .Update
End With

Set objMessage = Server.CreateObject("CDO.Message")

Set objMessage.Configuration = objConfig

With objMessage
      .To       = "Display Name <email_address>"
      .From     = "Display Name <email_address>"
      .Subject  = "SMTP Relay Test"
      .TextBody = "SMTP Relay Test Sent @ " & Now()
      .Send
End With

Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
%>
Check this out.. this has more detailed info on what you are trying to achieve...

http://www.docendo.se/mspress/msp_online/samplechapter/0735607729.htm

Cheers!!
you might want to go through this as well..

http://support.microsoft.com/?id=288807

Cheers!!
BTW.. what O.S and what version of exchange are you running?

Cheers!!
Avatar of vand3r

ASKER

Thanks for the suggestions AP - I will work through them today and let you know.  It is exchange 2003 running on and windows 2003 box.
Avatar of vand3r

ASKER

I ended up using this:

http://support.microsoft.com/?kbid=195591

because none of the comments really helped me figure out the error.  The link above did provide the same functionality I was after.

Also I had to be sure anonymous login was turned off at the webserver.  
Glad you solved the issue.

You can request for a points refund by posting a 0 point question in Community support with a link to this question.

Cheers!!
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    PAQ with points refunded

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

vnvk
EE Cleanup Volunteer
Either that or points to ap_sajith as his link helped to point things in the right direction.

FtB
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial