I have ServiceReferences.ClientConfig file as below
<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_ITCMDataService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:8185/TCMDataService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITCMDataService" contract="WcfServiceReference.ITCMDataService" name="BasicHttpBinding_ITCMDataService" /> </client> </system.serviceModel></configuration>
I am calling wcf method from silverlight
I am passing no. of parameters from silverlight to wcf method having list containing class object which has around 25 properties.I have added 6 item in that list but getting the error at the endinvoke of that method.
If I pass upto 5 items it works well.So I guess this is proplem of memory means wcf is not able to receive max data size.
Can anyone help is it the same issue I assume or may be different.
And if yes what I need to do ?
Thanks in Advance...
-Pankaj
Hi,
Could you please also paste the code that creates your WCF service client / proxy? Also, please provide more information about the error you are getting.
Thanks,
I am creating proxy by,
TestCaseDataService.TCMDataServiceClient proxy = new TestCaseDataService.TCMDataServiceClient("BasicHttpBinding_ITCMDataService");
and doing the following functionality on Save button click event
Normal 0 false false false MicrosoftInternetExplorer4
ObservableCollection<Web.Cortex.TestCaseDataService.ProjectCategoriesProfile> projectCategoriesProfileList = new ObservableCollection<Web.Cortex.TestCaseDataService.ProjectCategoriesProfile>();
foreach (Row row in dataGrid1.Rows)
{
if (row.Columns[3].HeaderText == "Status")
Web.Cortex.TestCaseDataService.ProjectCategoriesProfile item = new Web.Cortex.TestCaseDataService.ProjectCategoriesProfile();
//CheckBox chkbox = ((CheckBox)((CellControl)row.Cells[3].Control).Content);
//if (chkbox.IsChecked == true)
if((bool)row.Cells[3].Value==true)
item.ProjectCategoryID = Int32.Parse(row.Cells[0].Value.ToString());
projectCategoriesProfileList.Add(item);
}
ObservableCollection<Web.Cortex.TestCaseDataService.TestCaseJira> testCaseJiraProfileList = new ObservableCollection<Web.Cortex.TestCaseDataService.TestCaseJira>();
Web.Cortex.TestCaseDataService.TestCaseJira testCaseJira = null;
if (jiraProfileListNew.Count > 0)
foreach (Web.Cortex.TestCaseDataService.JiraProfile Jiraitem in jiraProfileListNew)
string key = Jiraitem.jiraKey.ToString();
if (key.LastIndexOf('/') != -1)
int lastindex = key.LastIndexOf('/');
key = key.Substring(lastindex + 1, ((key.Length - key.LastIndexOf('/')) - 1));
if (key != string.Empty)
testCaseJira = new Web.Cortex.TestCaseDataService.TestCaseJira();
// string JiraKey = item.Cells[0].Value.ToString().Split('');
//testCaseJira.ProjectID = (int)currentNode;
testCaseJira.projectID = ApplicationId;
testCaseJira.jiraKey = key;
testCaseJira.status = Jiraitem.status == null ? "" : Jiraitem.status;
testCaseJira.summary = Jiraitem.summary == null ? "" : Jiraitem.summary;
testCaseJira.description = Jiraitem.description == null ? "" : Jiraitem.description;
testCaseJira.issueType = Jiraitem.issueType == null ? "" : Jiraitem.issueType;
testCaseJiraProfileList.Add(testCaseJira);
string Jiracomponent = (lstComponent.SelectedItem==null) ? "" : ((ListItem)lstComponent.SelectedItem).Value;
string JiraVersions = (lstVersions.SelectedItem == null) ? "" : ((ListItem)lstVersions.SelectedItem).Value;
string Jiraassignee = (lstAssignee.SelectedItem == null) ? "" : ((ListItem)lstAssignee.SelectedItem).Value;
proxy.ModifyTestStepDataCompleted += new EventHandler<Web.Cortex.TestCaseDataService.ModifyTestStepDataCompletedEventArgs>(proxy_ModifyTestStepDataCompleted);
proxy.ModifyTestStepDataAsync(txtTestSummary.Text, txtTestStep.Text, txtExpResults.Text, ((ComboBoxItem)lstVersion.SelectedItem).Content.ToString(),
Jiracomponent, JiraVersions, Jiraassignee, TestCaseId, TestTypeId, ApplicationId, TestCaseDataId, ((ListItem)lstExecutionType.SelectedItem).Value,
((ListItem)lstPriority.SelectedItem).Value, txtComments.Text, (int)CortexProjectID, 12, projectCategoriesProfileList, testCaseJiraProfileList, TestStepList);
which call ModifyTestStepData method of wcf service but I have getting the error on following method which is present in reference.cs file
public int EndModifyTestStepData(System.IAsyncResult result) { object[] _args = new object[0]; int _result = ((int)(base.EndInvoke("ModifyTestStepData", _args, result))); return _result; }
that remote server return an error : Not found
So please suggest how to get out of this problem.
Thanks
Pankaj
I was missing the setting on server end (service end)
I added the
<binding name="MyBasicHttpBinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" /> </binding>
my own bindind and refered it in the endpoint
<endpoint address="http://localhost:8181/Service.svc" binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBinding" contract="Framework.Web.ITCMDataService">
No still the issue is as it is. I did the setting as per links but not found any solutio.
One more problem I have getting now,I am passing collection withing collection as a parameter to the wcf method.The parent collection has getting value in wcf service but the child collection become null.
Let me know if you have any idea for this problem.
Hi Pankaj,
Thanks for clarification.
The configuration seems fine to me, here are few suggestions:
HTH,