RPC客户端中的RPC访问被拒绝问题 [英] RPC Access denied problem in RPC client

查看:530
本文介绍了RPC客户端中的RPC访问被拒绝问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个项目,客户端需要在其中调用某些远程方法.
客户端和服务器都使用Win32 API.

服务器已成功注册其Iterface.
使用

I am creating a project in which the client needs to call some remote method.
Both the client and server is uses Win32 APIs.

The server have sucessfully registered it''s iterface sucessfully.
The client it getting a valid have value to the remote system using

RpcBindingFromStringBinding

API.

但是,当实际的RPC方法被调用时,它会引发异常,并且

API.

But when the actual RPC method is called it''s throwing an exception and

RpcExceptionCode()

API返回5(访问被拒绝错误).

我应该怎么做才能解决此问题.

我正在使用

API returning 5 (Access denied error).

What should I do to resolve this problem.

I am using

ncacn_ip_tcp

协议序列,并在Windows 7中测试了我的代码.

protocol sequence and I tested my code in Windows 7.

推荐答案

客户端线程需要具有服务器上的有效凭据.通常为RPC服务器创建一个帐户并将该凭据提供给客户端线程.
The client thread needs to have valid credentials on the server. It is common use to create an account for an RPC-Server and give that credentials to the client threads.


这篇关于RPC客户端中的RPC访问被拒绝问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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