| Previous | Next |
| COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED | COMADMIN_E_PROGIDINUSEBYCLSID |
COMADMIN_E_CANTMAKEINPROCSERVICE
In-process library hosting versus Windows service hosting: exact meaning of COMADMIN_E_CANTMAKEINPROCSERVICE
COM+ rejected an attempt to make a library application an NT service. A library application runs in the creator’s process; a COM+ service application is a server application hosted and managed as a Windows service.
The Windows SDK describes the condition as “Library applications may not be NT services.”
Where the result occurs
The failure occurs during service creation or application configuration after COM+ reads the activation type. The host model must be changed coherently before service identity, startup, dependencies, or recovery can apply.
Evidence to collect before changing the catalog
- AppID, Activation property, service-related properties, and current component set.
- the exact service-creation call, service name, start type, identity, and dependencies.
- component assumptions about in-process state, client identity, and apartment model.
- source package configuration and target catalog values after Populate.
Typical cause branches
- CreateServiceForApplication is called for an application whose Activation property is library.
- deployment sets the service flag without converting and validating the application as a server application.
- a package imported from another environment changes application type assumptions.
- automation identifies the application by name and selects a library application unintentionally.
Diagnostic sequence
- Confirm the application identity and activation type.
- evaluate whether components are safe and supported out of process.
- convert to a server application through supported COM+ configuration when appropriate.
- Validate identity, security, marshaling, and client behavior before creating the service.
- Create and test the service only after server activation is committed.
Practical administration scenario
A packaging script attempts to give an existing library application automatic service startup, but the components were designed to load inside each client process.
Retry and recovery
The service-creation request remains invalid while Activation is library. A successful redesign may require code and deployment testing, not just one property change.
Difference from nearby COMADMIN results
COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE concerns incompatible options after service hosting is selected; this code rejects service hosting for an in-process library application.
What this HRESULT does not establish
Do not assume that changing Activation to server is behaviorally neutral. Process identity, marshaling, security, lifetime, and performance can all change.
Developer and operations guidance
Record AppID, activation type, component CLSIDs, requested service properties, caller, package source, and results of out-of-process compatibility tests.
Official Microsoft references
Looking for a different code? Search another status or error code.