我创建了WCF服务并使用独立应用程序测试WCF客户端.我能够使用Internet Explorer查看此服务,也可以在Visual Studio服务引用中查看.这是错误消息.
"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8)."
你能不能指出可能出错的地方?
谢谢.
我想在我的WCF服务中添加一个额外的项目.这是我的代码.我有一个代码从数据库中获取值.我想将默认项"All"添加到数组中.这是我的WCF代码.
RadComboBoxData result = new RadComboBoxData();
var listView = new listTypedView();
//In case the user typed something - filter the result set
string text = String.Concat("%", context.Text, "%");
if (!String.IsNullOrEmpty(text))
{
using (DataAccessAdapter adapter = LLBLGenAdapterUtility.GetAdapter())
{
RelationPredicateBucket filter = new RelationPredicateBucket();
filter.PredicateExpression.Add(ViewNameFields.Name % text);
adapter.FetchTypedView(personView.GetFieldsInfo(), listView, filter, 0, null, false);
}
}
var allList = from n in listView
select new RadComboBoxItemData
{
Text = n.pName,
Value = n.Id.ToString()
};
result.Items = allList.ToArray();
Run Code Online (Sandbox Code Playgroud)