This is the segment of code around the error.
_samplesObjectGrid.DataSource = null;
//
//If all users is checked then return for all users
//otherwise return for current user.
//
try
{
HA.IntelliSystem.ClientConnecter cConn = new
HA.IntelliSystem.ClientConnecter();
string connectedUserName = cConn.ConnectedUserName;
//DataTable sampleTable;
List<SampleObject> sampleTable;
if (_currentUserToolStripMenuItem.Checked)
sampleTable =
_SampleManagment.BrowseSamples("Owner",connectedUserName,
_sampleFilterCombo.SelectedItem.ToString(),_samplesTree.SelectedNode.Text);
else
sampleTable =
_SampleManagment.BrowseSamples(_sampleFilterCombo.SelectedItem.ToString(),
_samplesTree.SelectedNode.Text);
_samplesObjectGrid.DataSource = sampleTable;
_samlesView.DataSource = sampleTable;
}
catch (System.Runtime.Serialization.SerializationException se)
{
System.Diagnostics.Trace.WriteLineIf(true, se.Message);
throw;
}
The following line is the one that actually caused the exception.
sampleTable = _SampleManagment.BrowseSamples("Owner",connectedUserName,
_sampleFilterCombo.SelectedItem.ToString(),_samplesTree.SelectedNode.Text);
_SampleManagment is a remote object that is on the server using a TCP
channel and binary formatter.
Thank you so much for your help.
Ricky
> Hi Ricky,
>
[quoted text clipped - 13 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
Luke Zhang [MSFT] - 07 Apr 2006 07:04 GMT
Thank you for the information. Regarding the problem, I suggets you add
some debug code before following line:
sampleTable = _SampleManagment.BrowseSamples("Owner",connectedUserName,
_sampleFilterCombo.SelectedItem.ToString(),_samplesTree.SelectedNode.Text);
For example, add above line in a try-catch block and log the parameters
like: connectedUserName,
_sampleFilterCombo.SelectedItem.ToString(),_samplesTree.SelectedNode.Text
to a database when catching an exception. In this way, you may get a
sample which can make the problem reproducable.
Then we can make further research to see what is the problem.
Luke Zhang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
If there is anyother code that you need please let me know. I do remoting
setup through code, and i can also send you the SampleObject which is a
fairly large object with child objects.
> Hi Ricky,
>
[quoted text clipped - 13 lines]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)