I am using the dll createsend-dotnet.net.35 and want to return all the active subscribers for a given list. i've looked at the sample code and doing the same but the method Active is returning me 0. On the CM dashboard, i have over 2000 active subscribers for that list. Anyone has an idea why my count is 0?
List list = new List(listID);
List<SubscriberDetail> allSubscribers = new List<SubscriberDetail>();
//get the first page, with an old date to signify entire list
PagedCollection<SubscriberDetail> firstPage = list.Active(new DateTime(2012, 1, 1), page, pageSize, "Email", "ASC");
allSubscribers.AddRange(firstPage.Results); // >>> allSubscribers.Count = 0 here!
Thanks a lot.
There could be a number of reasons that your result set is zero.
1. new DateTime(2012,1,1) means you're asking for the subscribers that have joined in the year 2012. Is your list older than that, containing only older subscribers?
2. What are the values of page and pageSize - are they going to combine to produce an empty set? (ie if they're set to 4 & 1000 respectively you'll be getting the 3001th -> 4000th subscribers, which don't exist)
3. You have the wrong listID
There could be other reasons, so if the above doesn't help you to sort out the problem i'd suggest you contact support so we can look into it. Be sure to include sufficient information so we can easily identify your account.
Hi Phil, thanks a lot for your reply. It seems it's working fine now, actually i have a web application that is using a class library, which in turns contains methods that expose the createsend-dotnet.dll, and after some debugging, i found that the built in web server of visual studio was not getting the latest dll that i was building.. that's weird. I then hosted the web app into IIS and again after some debugging, i found that sometimes i had to do an iisreset as if to refresh the dll (i.e. my class library exposing the methods of the createsend-dotnet.dll), Totally weird :)
Thanks again for your reply.