您有一个COM+服务器应用程序,其中将身份配置为作为特定用户运行。工作一段时间后,应用程序可能会停止工作并继续失败。您必须重新启动COM+应用程序才能解决此问题。在今天的帖子中,我们将找出原因并提供解决方案,以解决当用户注销时COM+ application may stop working在Windows 10中停止工作的问题。(Windows 10)
COM+应用程序是组件(Component) 服务(Services)的主要管理和安全单元,由一组通常执行相关功能的COM组件组成。(COM)
通过将COM(COM)组件的逻辑组创建为COM+应用程序,您可以利用COM+的以下优点:
- COM组件的部署范围。
- COM组件的通用配置范围,包括安全边界和排队。
- 组件开发人员未提供的组件属性的存储(例如,事务和同步)。
- 按需加载到进程 ( DLLHost.exe ) 中的组件动态链接库 ( DLL )。(DLLs)
- 托管组件的托管服务器进程。
- 创建和管理组件使用的线程。
- 访问资源分配器的上下文对象,允许获取的资源与上下文自动关联。
事件 ID 10006(Event ID 10006)和 1530,COM+应用程序不工作
当用户注销时COM+Windows中停止工作时,您可能会在客户端计算机上的应用程序日志中看到类似于以下内容的错误。(Application)COM+服务器应用程序在同一台计算机上运行,您将在COM+服务器上看到以下错误:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10006
Date: 10/17/2009
Time: 1:36:39 PM
User: Domain\user
Computer: *****
Description:
DCOM got error “Unspecified error ” from the computer ‘servername’ when attempting to activate the server: {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}
COM+应用程序的计算机的应用程序(Application)日志中看到类似于以下内容的事件:
日志名称:应用程序
源:Microsoft-Windows-用户配置文件服务(Microsoft-Windows-User Profiles Service)
日期:2009 年 10 月 26 日上午 8:22:13
事件 ID:1530
任务类别:无
级别:警告
关键字:经典
用户:系统
计算机:服务器
名称描述:
检测到 Windows您的注册表文件仍在被其他应用程序或服务使用。现在将卸载该文件。保存您的注册表文件的应用程序或服务之后可能无法正常运行。
详细信息
- 从 \Registry\User\S-1-5-21-1049297961-3057247634-349289542-1004_Classes 泄露的 1 个用户注册表句柄:
进程 2428 (\Device\HarddiskVolume1\Windows\System32\dllhost.exe) 已打开密钥\REGISTRY\ USER \ S-1-5-21-1123456789-3057247634-349289542-1004_CLASSES
导致事件 ID 10006 和 1530 的原因
据微软称;
The User Profile Service will force the unloading of a user profile when that user logs off. This is a situation where the functionality of forcing the unload of the user profile may break an application if registry handles are not closed in the process. This new User Profile Service functionality is the default behavior.
COM+应用程序关联的用户标识在COM+应用程序首次初始化时登录。因此,如果此用户要从计算机注销,则会触发此问题,然后用户的配置文件将被卸载,COM+应用程序无法再读取用户身份配置文件中的注册表项。
要解决此问题,您需要通过组策略编辑器(Group Policy Editor)(gpedit.msc)修改用户配置文件服务的默认行为。(User Profile Service)
方法如下:
Computer Configuration > Administrative Templates > System > User Profiles
- 在右窗格中,双击不要在用户注销时强制卸载用户注册表(Do not forcefully unload the user registry at user logoff)条目以编辑它的属性。
- 现在,通过选择禁用新用户配置文件服务(User Profile Service)功能的相应单选按钮,将设置从未配置(Not Configured)更改为启用。(Enabled)
- 单击应用(Apply)>确定(OK)。
策略设置“不要在用户注销时强制卸载用户注册表”可以对抗(Do not forcefully unload the user registry at user logoff)Windows客户端操作系统的默认行为。启用后,用户配置文件服务(User Profile Service)将不会强制卸载注册表,而是等到没有其他进程正在使用用户注册表后再卸载它。
Hope this helps!
Event ID 10006 and 1530: COM+ application not working in Windows 10
You have a COM+ server application in which the identity is configυred to run as a ѕpесific user. After working for some time, the applicаtion may stop working and keep fаiling. You have tо restart the COM+ application to rеsolve the issue. In today’s post, we wіll іdentify the cause and then provide the resolution to the issue of a COM+ application may stop working in Windows 10 when a user logs off.
A COM+ application is the primary unit of administration and security for Component Services and consists of a group of COM components that generally perform related functions.
By creating logical groups of COM components as COM+ applications, you can take advantage of the following benefits of COM+:
- A deployment scope for COM components.
- A common configuration scope for COM components, including security boundaries and queuing.
- Storage of component attributes not provided by the component developer (for example, transactions and synchronization).
- Component dynamic-link libraries (DLLs) loaded into processes (DLLHost.exe) on demand.
- Managed server processes to host components.
- Creation and management of threads used by components.
- Access to the context object for resource dispensers, allowing acquired resources to be automatically associated with the context.
Event ID 10006 & 1530, COM+ application not working
When a COM+ application stops working in Windows when a user logs off, you may see an error that resembles the following in the Application log on the client machine. If the client executable runs on the same computer as the COM+ server application, you will see this error on the COM+ server:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10006
Date: 10/17/2009
Time: 1:36:39 PM
User: Domain\user
Computer: *****
Description:
DCOM got error “Unspecified error ” from the computer ‘servername’ when attempting to activate the server: {AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}
You’ll also see events that resemble the following in the Application log of the computer on which the COM+ application runs:
Log Name: Application
Source: Microsoft-Windows-User Profiles Service
Date: 10/26/2009 8:22:13 AM
Event ID: 1530
Task Category: None
Level: Warning
Keywords: Classic
User: SYSTEM
Computer: SERVERNAME
Description:
Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.
DETAIL –
1 user registry handles leaked from \Registry\User\S-1-5-21-1049297961-3057247634-349289542-1004_Classes:
Process 2428 (\Device\HarddiskVolume1\Windows\System32\dllhost.exe) has opened key \REGISTRY\ USER \ S-1-5-21-1123456789-3057247634-349289542-1004_CLASSES
What causes Event ID 10006 and 1530
According to Microsoft;
The User Profile Service will force the unloading of a user profile when that user logs off. This is a situation where the functionality of forcing the unload of the user profile may break an application if registry handles are not closed in the process. This new User Profile Service functionality is the default behavior.
The user identity that is associated with the COM+ application is logged on when the COM+ application is first initialized. So, this issue is triggered if this user were to log off of the machine then the user’s profile would get unloaded and the COM+ application can no longer read registry keys in the profile of the user identity.
To resolve this issue, you’ll need to modify the default behavior of the User Profile Service via Group Policy Editor (gpedit.msc).
Here’s how:
- Launch Local Group Policy Editor.
- Navigate to the following path:
Computer Configuration > Administrative Templates > System > User Profiles
- On the right pane, double-click the Do not forcefully unload the user registry at user logoff entry to edit it’s properties.
- Now change the setting from Not Configured to Enabled by selecting the corresponding radio button which disables the new User Profile Service feature.
- Click Apply > OK.
The policy-setting ‘Do not forcefully unload the user registry at user logoff‘ counters the default behavior of the Windows client operating system. When enabled, the User Profile Service will not forcefully unload the registry, instead, it waits until no other processes are using the user registry before it unloads it.
Hope this helps!