执行WCF功能时出错 [英] Getting error while executing WCF function

查看:95
本文介绍了执行WCF功能时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在服务器上托管我的应用程序后,我收到以下错误,有些机构会建议我需要做出哪些更改才能使服务正常工作吗?



系统.InvalidOperationException:合同操作'OperationName'需要Windows标识才能进行自动模拟。对于合同('Contract Name','http://tempuri.org/'),绑定('WebHttpBinding','http://tempuri.org/')不提供代表调用者的Windows标识。



提前致谢

After hosting my application on server I am getting below error can some body will advice me what changes I need to make so that service will work fine?

System.InvalidOperationException: The contract operation 'OperationName' requires Windows identity for automatic impersonation. A Windows identity that represents the caller is not provided by binding ('WebHttpBinding','http://tempuri.org/') for contract ('Contract Name','http://tempuri.org/'.

Thanks in advance

推荐答案

刚在service.cs中添加了这一行。



之前添加的web.config中的所有更改都已退回。

Just added this line in my service.cs.

previously added all the changes in web.config is backed out.
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]





及其正常工作。



谢谢大家...特别是CodeProject ...



and its working fine.

Thanks everyone.. specially CodeProject...


请参阅下面的链接,类似的问题已经解决。



http://stackoverflow.com/questions/6530477/impersonation-in-self-hosted-wcf [ ^ ]
Refer below link , a similar issue which has been solved.

http://stackoverflow.com/questions/6530477/impersonation-in-self-hosted-wcf[^]


这篇关于执行WCF功能时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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