WCF 调用方未由服务进行身份验证
-
2008年9月25日 3:58
通过VS2008建立WCF Service,配置IIS,通过本地地址http://10.238.14.99/WcfService1/Service1.svc可以访问,本地客户端调用也没有问题。
但是,远程可以访问http://10.238.14.99/WcfService1/Service1.svc,但远程客户端调用时
Service1Client sc = new Service1Client();
Response.Write(sc.GetData(1009));
提示错误信息“调用方未由服务进行身份验证”
不知道是服务端问题,还是客户端问题
答案
-
2008年9月25日 6:41版主
您好!
关于VS2008等开发的问题,我们建议您到以下版块中发帖,以便您的问题得到更好的解决。
感谢您的理解和支持。
Tom Zhang 张一平
-
2008年9月28日 3:54
找到解决方法了,在服务端配置文件添加<binding>配置验证<Security=“none”>,客户端配置验证<Security=“none”>
虽然不是解决问题最终方法,但是也能基本应用
谢谢版主提醒
全部回复
-
2008年9月25日 6:41版主
您好!
关于VS2008等开发的问题,我们建议您到以下版块中发帖,以便您的问题得到更好的解决。
感谢您的理解和支持。
Tom Zhang 张一平
-
2008年9月28日 3:54
找到解决方法了,在服务端配置文件添加<binding>配置验证<Security=“none”>,客户端配置验证<Security=“none”>
虽然不是解决问题最终方法,但是也能基本应用
谢谢版主提醒
-
2008年9月28日 4:04
服务器Config文件,添加
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="httpconf">
<security mode="None">
<transport clientCredentialType="Windows"/>
<message clientCredentialType="Windows"/>
</security>
</binding>
</wsHttpBinding>
</bindings></system.serviceModel>
然后配置终结点属性
<endpoint address="" binding="wsHttpBinding" contract="ConsoleApplication1.IService1" bindingConfiguration="httpconf">
<identity>
<dns value="localhost" />
</identity>
</endpoint>添加“bindingConfiguration”属性
服务器Config文件配置完成
下面配置客户端Config文件
将客户端Config文件<security mode="None">设置为None就可以了
-
2009年6月21日 2:55
设置一下安全模式为none也无效,后来我设置为
<security mode="Message">
<message clientCredentialType="Windows"
negotiateServiceCredential="true"
algorithmSuite="Default"
establishSecurityContext="true" />
</security>这样本机\局域网都OK了,但是广域网还是不行???谁知道呀,帮帮忙