如何用Windows Phone 8解决托管WCf的问题 [英] How to solve problem in hosting WCf with Windows phone 8

查看:88
本文介绍了如何用Windows Phone 8解决托管WCf的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WCF服务并且它在我的本地机器上运行正确..当我在服务器上传它时我试图在Windows窗体上运行它并且它正确运行但是当我试图在Windows手机上运行它时给了我这些例外







I'm using WCF service and it run correct while it's on my local machine ..when i upload it on server i tried to run it on windows form and it runs correctly but when i tried to run it on windows phone it gave me these exception



An exception of type 'System.ServiceModel.ProtocolException' occurred in System.ServiceModel.ni.dll but was not handled in user code

Additional information: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<html dir="rtl">



<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">

<link rel="stylesheet" type="text/css" href="style.css" />

<meta http-equiv="Content-Language" content="ar-eg">

<title>Elsayad &gt; login</title>

<script language="JavaScript">

<!--

function FP_preloadImgs() {//v1.0

 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();

 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }

}



function FP_swapImg() {//v1.0

 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;

 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;

 elm.$src=elm.src; elm.src=args[n+1]; } }

}



function FP_getObjectByID(id,o) {//v1.0

 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);

 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;

 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if'.









任何人都可以帮我解决这个异常





can any one help me solve this exception

推荐答案

imgSwaps = new Array(); for(n = 2; n< args.length;

n + = 2){elm = FP_getObjectByID(args [n]); if(elm){doc。
imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.


imgSwaps [doc。
imgSwaps[doc.


imgSwaps.length] = elm;

elm。
imgSwaps.length]=elm; elm.


这篇关于如何用Windows Phone 8解决托管WCf的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆