• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >vc/mfc > 为什么DCOM拒绝访问

为什么DCOM拒绝访问

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-04

佚名通过本文主要向大家介绍了dcom是什么,9955dcom最近十天更新,8844dcom更新后地址,dcom配置,9955dcom首页等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 为什么DCOM拒绝访问
描述:

我在远程客户端创建DCOM,不成功,不能得到接口指针,错误提示:拒绝访问。安全性设置如: hr = CoInitializeSecurity(NULL, -1, NULL, NULL,
RPC_C_AUTHN_LEVEL_NONE, 
RPC_C_IMP_LEVEL_ANONYMOUS,NULL, EOAC_NONE, NULL);请问这是怎么回事?怎么解决?


解决方案1:

Turning Off Call Security
Call security determines whether a client has permission to call a server's methods. There are two ways to disable call security: One involves using Dcomcnfg.exe to modify the registry, and the other requires calls to CoInitializeSecurity. 
Turning Off Call Security Using DCOMCNFG
Call security can most easily be turned off by using Dcomcnfg.exe to modify the registry. However, using Dcomcnfg.exe to turn security off will work only if both the client and the server do not call CoInitializeSecurity. This is because when CoInitializeSecurity is called, DCOM ignores the registry settings and uses the values supplied to CoInitializeSecurity instead. 
To turn off security with Dcomcnfg.exe, both the client and the server must set their Authentication Levels to None. The following steps must be completed: 
Run Dcomcnfg.exe. 
On the Applications page, select the application that represents the server. Click the Properties button (or double-click the selected application). 
Click the General tab. 
From the Default Authentication Level list box, select (None). 
Click the Apply button to apply changes; however, changes are not applied to any running instances of the application. 
If the client appears on the list on the Applications page, repeat steps 2 through 5, choosing the client instead of the server for step 2. Then click the OK button. If the client is not on the list, you can do one of the following three things: 
You can set the client's Authentication Level to None on a machine-wide basis by using Dcomcnfg.exe. (See the warning and the procedure below.) 
You can set the client's authentication level to None programmatically. (See Turning Off Call Security Programmatically.) 
If you are using Microsoft® Windows NT® 4.0 SP4 or Microsoft Windows® 2000, you can create an AppID key for the client to indicate an authentication level of None. (See Setting Processwide Security Through the Registry.) 
To set the Authentication Level to None on a machine-wide basis:
Warning   Setting the machine-wide Authentication Level to None is extremely unsecure. 
Run Dcomcnfg.exe. 
Choose the Default Properties tab. 
From the Default Authentication Level list box, choose (None). 
Click the OK button. 
Turning Off Call Security Programmatically
To turn call security off programmatically, both the client and the server must call CoInitializeSecurity, setting the authentication level in the dwAuthnLevel parameter to RPC_C_AUTHN_LEVEL_NONE. 
See Also
Turning Off Activation Security
详细内容
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/security_53sp.asp

解决方案2:

U CAN use CoSetProxyBlanket  Look For MSDN

解决方案3:

要不在com+的程序里添加用户,要不就使用guest用户,在windows下使guest用户可用。


分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • DCOM中的多串口通讯
  • ★★★关于DCom服务器★★★
  • net中调用dcom对象如何释放
  • 问:不同网段之间可以使用DCOM通讯么?500分
  • DCOM如何走Internet?
  • dcom的问题
  • dcom的问题
  • 请问dcom能够实现这样的问题吗分不够另外给分
  • 一个比较朦胧的问题com/dcom/com+问题,朋友门都来看看
  • Dcom传人输出型字符串的问题!

相关文章

  • 2017-06-04 关于事件参数的问题?
  • 2017-06-04 如何把ocx空间里面的功能看书导出成winapi的dll
  • 2017-06-04 关于xml的,下面这几句什么意思?
  • 2017-06-04 各位大侠,MFC或c++里如何保存powerpoint幻灯片上的图片?
  • 2017-06-04 如何通知IE浏览器?
  • 2017-06-05 关于对话框的多线程问题!!
  • 2017-06-05 互斥的疑问?·
  • 2017-06-04 如果添加一工具栏在窗体中高结贴率解决马上结贴
  • 2017-06-04 openCV32cv::cvtColor函数内存泄漏?
  • 2017-06-04 哪里有能画历史曲线图的组件?

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 神拉,救救我吧!!!!!!!!!111
    • 用ATL写OfficeCOM-Addin遇到的问题
    • 如何用程序禁用office的宏命令?
    • 请教下CComDispatchDriver如何判空?
    • 奇怪啊,为什么::StgIsStorageFilebfn对什么文件都反回真?
    • [问题重发]MSHTML不是WebBrowser如何拦截弹出窗口?蒋大哥进。
    • MFC中如何用GetFieldValue获取缓冲池内的long类型数据
    • 关于加载组件的一个问题,请大家给看看
    • VC写控件,VB调用出现RUNTIME5错误
    • 送分的问题:

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有