Wow... I pressed "Back" .. then my text all disappered... I'm re-typing..
Actually I'm not so clear about where your error has been created. (Don't trust the -Throw out..)
Let's do some Further check..
1) Add break point to your "Return" in your remote function and Post Out your Data in Remote List (Has not been sent back, Before the error appeared)
2) If your data is OK, then try to modify your Remote Function(pls do backup before this..) into a function which returns an Integer.(Just check) And replace your "Return something" with "return 0;", update proxy code in Client side, and try to receive the
"0".
3) If your "0" successfully transfered, and there's no error anymore. The error will be locked on DATA-Serialization -Problem. Your object[] cannot be serialized normally. But my WCF also contains "[]", they works fine..
Waiting your further explore..
My English level is just Chinese-Sounded-English, so I'm sorry for that
Wow... I pressed "Back" .. then my text all disappered... I'm re-typing..
Actually I'm not so clear about where your error has been created. (Don't trust the -Throw out..)
Let's do some Further check..
1) Add break point to your "Return" in your remote function and Post Out your Data in Remote List (Has not been sent back, Before the error appeared)
2) If your data is OK, then try to modify your Remote Function(pls do backup before this..) into a function which returns an Integer.(Just check) And replace your "Return something" with "return 0;", update proxy code in Client side, and try to receive the
"0".
3) If your "0" successfully transfered, and there's no error anymore. The error will be locked on DATA-Serialization -Problem. Your object[] cannot be serialized normally. But my WCF also contains "[]", they works fine..
Waiting your further explore..
My English level is just Chinese-Sounded-English, so I'm sorry for that
Thanks for your replay and valuable suggestion, i understand how you feel when you lost your data ( whatever you type for me) but it happen some time [:))] ...Even my english is not upto mark, i am fine with your english.
I have one more method at WCF server called GetData(int d) which accept interger from client and return ToString().
yes i am able to get data at client....there is no problem getting string data from GetData() method.
but while getting Object[] array from GetComponet() method i am getting error.
this errror raise at cleint side reference.cs file....i have mentioned that....i am able to debug my server method without any exception, i have put try catch block at server method and a break point in catch block but nothong happend their...........
my motive is to get datatable from DAL to WCF to my silverlight Client DataGrid, is their any other way to do the same?
structure of the datatable is dyanamic.
Thanks lot.
Please click on "Mark As Answer", if this answered your query partially or fully.
Thanks lot, finaly i am able to solve my problem. I moved my run time class creation code to silverlight client.
At WCF, i am filling my DataSetData class object using DataTable from DAL and also story my DataTable xml in DataSetData, which has [DataContract] attribute, and hence available to silverlight Client, and finaly at client side i am using DataSetData class
object to create run time class and xml to create object of that class and finaly i m binding run time class object to DataGrid.
For better understanding, you can download code...
I have used this code as a base for my problem, but i need only Oneway binding, so i have not used Template for 2 way binding given in this sample application.
Thanks.
Avtar.
Please click on "Mark As Answer", if this answered your query partially or fully.
struggle-luan
Member
592 Points
104 Posts
Re: How to solve CommunicationException.....?
Jan 06, 2009 12:02 PM | LINK
Wow... I pressed "Back" .. then my text all disappered... I'm re-typing..
Actually I'm not so clear about where your error has been created. (Don't trust the -Throw out..)
Let's do some Further check..
1) Add break point to your "Return" in your remote function and Post Out your Data in Remote List (Has not been sent back, Before the error appeared)
2) If your data is OK, then try to modify your Remote Function(pls do backup before this..) into a function which returns an Integer.(Just check) And replace your "Return something" with "return 0;", update proxy code in Client side, and try to receive the "0".
3) If your "0" successfully transfered, and there's no error anymore. The error will be locked on DATA-Serialization -Problem. Your object[] cannot be serialized normally. But my WCF also contains "[]", they works fine..
Waiting your further explore..
My English level is just Chinese-Sounded-English, so I'm sorry for that
avtar
Participant
777 Points
208 Posts
Re: How to solve CommunicationException.....?
Jan 06, 2009 12:31 PM | LINK
Thanks for your replay and valuable suggestion, i understand how you feel when you lost your data ( whatever you type for me) but it happen some time [:))] ...Even my english is not upto mark, i am fine with your english.
I have one more method at WCF server called GetData(int d) which accept interger from client and return ToString().
yes i am able to get data at client....there is no problem getting string data from GetData() method.
but while getting Object[] array from GetComponet() method i am getting error.
this errror raise at cleint side reference.cs file....i have mentioned that....i am able to debug my server method without any exception, i have put try catch block at server method and a break point in catch block but nothong happend their...........
my motive is to get datatable from DAL to WCF to my silverlight Client DataGrid, is their any other way to do the same?
structure of the datatable is dyanamic.
Thanks lot.
avtar
Participant
777 Points
208 Posts
Re: How to solve CommunicationException.....?
Jan 07, 2009 08:56 AM | LINK
Hi,
Thanks lot, finaly i am able to solve my problem. I moved my run time class creation code to silverlight client.
At WCF, i am filling my DataSetData class object using DataTable from DAL and also story my DataTable xml in DataSetData, which has [DataContract] attribute, and hence available to silverlight Client, and finaly at client side i am using DataSetData class object to create run time class and xml to create object of that class and finaly i m binding run time class object to DataGrid.
For better understanding, you can download code...
http://cid-9cffd385fd75195b.skydrive.live.com/self.aspx/Silverlight/DataSetInDataGrid.zip
I have used this code as a base for my problem, but i need only Oneway binding, so i have not used Template for 2 way binding given in this sample application.
Thanks.
Avtar.