大网数据广告活动
Windows 系统接口

Turning Off Call Security

· 52CE 我爱测

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.

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:

  1. Run Dcomcnfg.exe.
  2. On the Applications page, select the application that represents the server. Click the Properties button (or double-click the selected application).
  3. Click the General tab.
  4. From the Default Authentication Level list box, select (None).
  5. Click the Apply button to apply changes; however, changes are not applied to any running instances of the application.
  6. 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 computer-wide basis by using Dcomcnfg.exe. (See the warning and the procedure below.)
    • You can set the client's authentication level to None programmatically.
    • You can create an AppID key for the client to indicate an authentication level of None. (See Setting Process-Wide Security Through the Registry.)

To set the Authentication Level to None on a computer-wide basis:

Note:
Setting the computer-wide Authentication Level to None is extremely unsecure.

  1. Run Dcomcnfg.exe.
  2. Choose the Default Properties tab.
  3. From the Default Authentication Level list box, choose (None).
  4. 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.

Related topics

Turning Off Activation Security

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。