Response always zero, help with Async patern

46 views
Skip to first unread message

Romi

unread,
Jul 24, 2012, 10:05:25 PM7/24/12
to servic...@googlegroups.com
Hi,

I use a simple patern to return my contents from some providers in my cms net3.5 webform. The solution is working but the result is always zero from the contents, I m not sure but it seem be a response delay problem. I have tested adding a Sleep but no results. Used in web application in App_Code or Binary same. Tested List, IList,strings same problem. Thanks for your help.

public class ItemsService : IService<Items>
{
    public object Execute(Items request)//Execute()
    {
        ItemsResponse res = new ItemsResponse();
        res.Items = ItemsList(request.baseclass, request.provider, request.language);//request.provider
        return res;
    }
    
    public IList ItemsList(string basename, string provider, string language)
    {       if(provider==string.Empty)
                provider = Manager.DefaultContentProvider;
            if (language == string.Empty)
                language = "es";
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(language);
            Manager manager = new Manager(provider);
            IList data = manager.Content.GetContent(); <== COUNT ALWAYS ZERO, BUT FULL
            Thread.Sleep(5000);
            return data;                    
    }
}
Reply all
Reply to author
Forward
0 new messages