View Full Version : Error using API to manage SmarterMail alias
jackr
01-24-2009, 10:50 AM
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@ (cole@sqlbeat.com)mydomain.com"
cAliasses(1) = "myEmail2@ (cole@sqlbeat.com)mydomain.com"
cAliasses(2) = "myEmail3@ (cole@sqlbeat.com)mydomain.com"
oEmail.SMUpdateAliasAddresses("myKey", "myDomain", "webmaster", cAliasses)
What am I doing wrong?
Thanks!
bruce
01-27-2009, 03:25 AM
We are looking to refresh the API some time before Q2. The bug will be fixed then.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
Aristotle
01-27-2009, 12:04 PM
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 (http://www.DiscountASP.NET)
jackr
01-27-2009, 12:37 PM
Gosh, that's a bummer. Is there an ETA on the next release?
Thanks!
Aristotle
01-28-2009, 11:43 AM
This bug should now be fixed.
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
jackr
01-29-2009, 12:18 PM
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) = "me@domain.com"
cAliasses(1) = "me@domain2.com"
cAliasses(2) = "me@domain3.com"
oEmail.SMUpdateAliasAddresses("mykey", "domain4.org", "webmaster", cAliasses)
Thanks!
Aristotle
01-29-2009, 12:43 PM
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).
jackr said...
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) = "me@domain.com"
cAliasses(1) = "me@domain2.com"
cAliasses(2) = "me@domain3.com"
oEmail.SMUpdateAliasAddresses("mykey", "domain4.org", "webmaster", cAliasses)
Thanks!
Aristotle
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
jackr
01-29-2009, 12:46 PM
Fantastic. Works perfectly now - thanks again for getting this resolved, and for catching my silly error!
jackr
02-05-2009, 07:14 AM
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
bruce
02-05-2009, 08:28 AM
Please create a support ticket. We'll check the system and find you the appropiate IP.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
jackr
02-05-2009, 09:02 AM
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?
bruce
02-06-2009, 02:42 AM
pls private message me the ticket number.. i can have an admin check the ticket again.
Bruce
DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)
vBulletin® ©Jelsoft Enterprises Ltd.