开发者

WCF Parameter loses values

I am populating a list of MyType with 20 elements, and passing it a开发者_开发技巧s a parameter to a WCF Service.

The only problem is that when it gets there, the list has no elements.

My service method is:

MyMethod(List<MyType> myList, string bla)

I'm calling it like this, from a Windows Forms App:

myService.MyMethod(myList.ToArray(), "bla"); // Here my list has 20 elements.

But when it gets to the WCF Service, the array is empty. :(

Could someone help me figure out why?

PS: My WCF Service is a Windows Azure Web Role, but I don't think it changes anything in this cenario. Or does it...?


Try a quick test application that self-hosts your service to verify that you're sending and receiving properly. If that works, then you can investigate Windows Azure as the cause of your problems.


It was in fact, a problem with namespaces and references...

Thank you guys.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜