Click here to Skip to main content
15,914,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
my service is
[OperationContract]
IEnumerable PerformSearch(TextSearchInformation textSearchInfo);

implementing a method

public IEnumerable PerformSearch(TextSearchInformation textSearchInfo)
{
if (textSearchInfo.SearchMode.Equals(SearchViewMode.QuickSearch))
{
return PerformQuickSearch(textSearchInfo);
}
return PerformAdvanceSearch(textSearchInfo);
}

and consuming this service in web application

using (Service1Client client = new Service1Client())
{

TextSearchInformation textSearchInfo = new TextSearchInformation();
textSearchInfo.CurrentSearchContext = SearchContext.Asset;
textSearchInfo.SearchCriteria = new Dictionary<string,>();
//textSearchInfo.SearchCriteria.Add(, "29");
textSearchInfo.SortExpression = "AssetNumber";
textSearchInfo.SearchMode = SearchViewMode.AdvanceSearch;
textSearchInfo.PageSize = 10;
var data = client.PerformSearch(textSearchInfo); //getting exception here
client.Close();

pls help !!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900