Error using API to manage SmarterMail alias

Discussion in 'Control Panel API' started by jackr, Jan 24, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. When I use the Sandbox key, from my Dev machine, my code runs without error.
    When I switch to the API key, still from my Dev machine, my code fails and the server returns a "Server was unable to process request. ---> An unknown error has occurred(1030)" error. DASP support indicates their logs show the following error:


    "System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list."

    Here is the code I'm using to call it:

    Dim oEmail As DASP.CustomerApi = New DASP.CustomerApi()
    Dim cAliasses(3) As String
    cAliasses(0) = "myEmail1@mydomain.com"
    cAliasses(1) = "myEmail2@mydomain.com"
    cAliasses(2) = "myEmail3@mydomain.com"


    oEmail.SMUpdateAliasAddresses("myKey", "myDomain", "webmaster", cAliasses)
    What am I doing wrong?

    Thanks!
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    We are looking to refresh the API some time before Q2. The bug will be fixed then.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. This is a bug with the API. It will be fixed on the next release. For now, you'll have to update it in the control panel.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Gosh, that's a bummer. Is there an ETA on the next release?


    Thanks!
     
  5. Thanks for taking on this bug so quickly!

    I just re-ran my test, and it still appears to work fine with the Sandbox key, but now I receive a different error when I use the API key.

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> DiscountASP.net.UnknownException: An unknown error has occurred(1030)

    The heading looks the same, but the error details look to be different. Have attached a screenshot.

    Am I doing something wrong?
    Has the method signature changed?

    Still calling it the same way:




    Dim oEmail As DASP.CustomerApi = New DASP.CustomerApi()
    Dim cAliasses(3) As String
    cAliasses(0) = "[email protected]"
    cAliasses(1) = "[email protected]"
    cAliasses(2) = "[email protected]"
    oEmail.SMUpdateAliasAddresses("mykey", "domain4.org", "webmaster", cAliasses)

    Thanks!
     

    Attached Files:

  6. Dim cAliasses(3) As String


    This means that 3 is the last index of the array for a total of 4 items. You should declare as cAliasses(2).

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. Fantastic. Works perfectly now - thanks again for getting this resolved, and for catching my silly error!
     
  8. Has something changed with the API?
    I am still able to run my code directly from my workstation, without error.
    When I try to run that same code from my DASP account, I receive an "DiscountASP.net.UserErrorException: Access denied." error. My DASP webserver IP is listed on my WhiteList, and I'm using the same Sandbox key that works from my workstation.

    I receive the same error with both the Sandbox key and the Production key from the DASP hosted version, while both keys work as expected from my workstation. My DASP webserver shows on my DNS panel as 64.209.134.8, and that's what I have on my IP WhiteList.

    Thanks,

    Cole
     
  9. Bruce

    Bruce DiscountASP.NET Staff

    Please create a support ticket. We'll check the system and find you the appropiate IP.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  10. Support has verified my server IP is 64.209.134.8, as I have it on the WhiteList.

    The code still works fine from my workstation using both keys, but does not work with either from the DASP account. Anything else that could be amiss?
     
  11. Bruce

    Bruce DiscountASP.NET Staff

    pls private message me the ticket number.. i can have an admin check the ticket again.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page