Article ID: 907758 - Last Review: March 9, 2006 - Revision: 1.0

An application that is developed in Visual Studio 2005 and that uses COM components stops responding when the application is deployed by using ClickOnce technology

Expand all | Collapse all

SYMPTOMS

When you try to start a Microsoft Windows application or a console application, the application stops responding. This behavior occurs when the following conditions are true:
  • The application is developed in Microsoft Visual Studio 2005 and is built on the Microsoft .NET Framework.
  • The application uses Microsoft Component Object Model (COM) components.
  • The application is deployed by using ClickOnce technology.

CAUSE

You cannot use ClickOnce technology to deploy an application that requires an explicit call to the CoInitializeSecurity function to customize the COM security level.

STATUS

This behavior is by design.

MORE INFORMATION

In Visual Studio 2005, when you create a managed application that interoperates with COM, the common language runtime (CLR) calls the CoInitializeSecurity function before the application interoperates with COM.

Note Interoperating with COM is generally referred to as COM interop.

When you start a ClickOnce application, the CLR calls the CoInitializeSecurity function when the CLR starts. The CLR starts before any application code is run. The first time that the CoInitializeSecurity function is called, the CoInitializeSecurity function sets the level of security access for the application. After the first time that the CoInitializeSecurity function is called, the level of security access for the application cannot be changed. The level of security access that is provided when the CLR calls the CoInitializeSecurity function may be lower than the level of security access that the application requires. When the level of security access that is provided is lower than the level of security access that the application requires, the application does not run.

APPLIES TO
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
Keywords: 
kbtshoot kbnofix kbprb kbdesign KB907758
 

Article Translations

 

Related Support Centers