WCF服务之间的通信 [英] Communication between the WCF services

查看:78
本文介绍了WCF服务之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Windows WCF服务向另一个WCF Windows服务进行调用的情况,需要特别注意的是,该调用不是由客户端应用程序触发的.由于这两个服务都在本地系统帐户中运行,因此其他Windows组的身份验证 服务失败.

I have scenario where windows WCF service make calls to another WCF windows service and important to note that call is not triggered by the client application. As both the services are running in local system account windows group autherization of other service is failing.

如何在调用另一个服务之前模拟当前已登录Windows且具有Windows组访问权限的Windows用户,以便使用Windows组的服务验证工作.

How can i impersonate currently logged in windows user which has windows group access before making call to another service so that my services autherization work which uses windows group.

您的支持将不胜感激.

谢谢..

推荐答案

您好RahulSharma87,

Hi RahulSharma87,

>>由于这两个服务都在本地系统帐户中运行,因此其他服务的Windows组身份验证失败

>> As both the services are running in local system account windows group autherization of other service is failing

基于此,您有两项服务,当您获得第一项服务或第二项服务的未授权例外时,可以与我们共享吗?

Based on this, you have two services, could you share us when you got unauthorize exception, from first service or second service?

您需要访问服务资源还是只需要执行Windows身份验证?

Did you need access service resource or only need perform windows authentication?

在我的选择中,建议您使用网络帐户运行服务.如果仍然出现此错误,则可以添加以下代码.

In my option, I would suggest you run service under network account. If you still get this error, you could add below code.

ServiceClient client=new ServiceClient();
client.Credentials=System.Net.CredentialCache.DefaultCredentials;

最好的问候,

Best Regards,

爱德华


这篇关于WCF服务之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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