Resolving WinCC V7 "Cannot Open Project" Error hr=0x80046107 / hr=0x80046127 During Example Project Migration
Engineers who download a Siemens WinCC example archive such as CustomizedControls.mcp and try to open it on a workstation running an older WinCC V7 service pack frequently see the runtime abort with the message "Cannot open WinCC Project – Project manager for configured WinCC Server is not already running – Start Project Manager for configured server", followed by migration log entries reporting hr=0x80046107 and hr=0x80046127 against the CS AlarmLogging component. This article documents the exact root cause, the meaning of both HRESULT codes, the official migration paths between WinCC V7 service packs and WinCC Professional, and the verification steps to confirm a clean project load.
1. Problem Description
Reproduction environment captured from the original failure log:
| Parameter | Value |
|---|---|
| Source archive |
CustomizedControls.mcp (example project, application ID 39891941, "Customizing of WinCC Runtime Professional Controls") |
| Target install | WinCC V7.0 SP1 (build 7.0.1.x), Windows 7 SP1 x64 |
| Project path | C:\CustomizedControls\CustomizedControls.mcp |
| Migration target attempted | TIA Portal V13 / V14 with WinCC Professional option |
| Primary user message | Cannot open WinCC Project – Project manager for configured WinCC Server is not already running |
| Secondary message | Impossible to load the file C:\CustomizedControls\CustomizedControls.mcp |
| Migration log HRESULT #1 |
hr=0x80046107 – CS AlarmLogging could not be updated |
| Migration log HRESULT #2 |
hr=0x80046127 – CS AlarmLogging could not be updated / Error closing WinCC project |
The log window explicitly reports PROJECT TYPE: unknown and the wizard finishes with Migration finished with errors. After the abort the explorer view of the project folder still contains the original .mcp file, the GraCS subfolder, the Library subfolder, and an incomplete Config directory, but the SQL-based configuration databases (WinCC.mdf, Alarm.mdf, Tag.mdf) are not present or are sized to zero.
2. Root Cause Analysis
The HRESULT range 0x80046100 through 0x800461FF is the WinCC COM error class. The two values reported here map to the AlarmLogging service:
| HRESULT | WinCC component | Plain-language meaning | Typical cause |
|---|---|---|---|
0x80046107 |
CS AlarmLogging | Alarm Logging configuration database cannot be opened, attached, or schema-updated by the running project manager instance. | Runtime version older than the project; project manager for the configured server is not started; CS component not registered in registry under HKLM\SOFTWARE\Siemens\WinCC\AlarmLogging. |
0x80046127 |
CS AlarmLogging | Alarm Logging runtime database close / detach failed during the abort sequence; the second log entry is the cleanup pass that fails because the first open already failed. | Cascading failure from 0x80046107; SQL Express instance not reachable on the configured server; the user has the file open in another process. |
The companion error Project manager for configured WinCC Server is not already running is raised by the WinCC project manager shell (CCProjectMgr.exe) when the local project does not list a server that is currently active. On a single-station install, the configured server name is the local machine hostname. The project manager service must be running before the migration wizard attempts to mount the .mcp file, otherwise the migration cannot acquire the COM session to the AlarmLogging configuration interface and returns the COM error above.
The decisive root cause is, however, a version mismatch. The example archive in question is the application "Customizing of WinCC Runtime Professional Controls", which is published on the Siemens support portal with the filter "Software: WinCC up to V7.x". The same example is built against the project database schema introduced in WinCC V7.2. Opening it on WinCC V7.0 SPx triggers the schema-upgrade path of AlarmLogging, which the V7.0 runtime cannot service, and the migration is aborted.
3. Why the Project Manager Does Not Start
On WinCC V7 the project manager is a Windows service group rather than a single daemon. When the migration wizard calls IWinCCProject::Open, the shell invokes CCProjectMgr.exe -open <path>. The shell then checks for the configured server entry in the registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\WinCC\Project<n>\Server
For the example to load successfully, the value Server must resolve to a host on which the WinCC Project Manager service is in state Started. The migration wizard will not start the service itself; it expects the operator to have launched WinCC Explorer on the configured server first. If the service is stopped, the wizard raises the user-visible message and exits with 0x80046107 when it finally tries to open the AlarmLogging configuration store.
WCC-SRV-01 and you copy the project to a different machine, the Server registry value still points to WCC-SRV-01. You must either rename the server entry to the local hostname or edit the project file with the WinCC Project Duplicator.4. Required Versions and Components
The example "Customizing of WinCC Runtime Professional Controls" is compatible only with the following minimum configuration:
| Component | Minimum | Recommended |
|---|---|---|
| WinCC V7 base | V7.2 | V7.5 SP2 or V7.5 SP3 |
| WinCC V7 update | Update 9 or later for V7.2 | Latest available update for the installed V7.x base |
| SQL Server | SQL Server 2014 Express bundled with WinCC | SQL Server 2016 SP2 or 2019 Express bundled with the installed WinCC update |
| .NET Framework | 4.6.2 (V7.2) / 4.7.2 (V7.4+) | 4.8 for V7.5 SP3 |
| Windows | Windows 7 SP1 / Server 2008 R2 (V7.2) | Windows Server 2019 / 2022 (V7.5 SP3) |
| WinCC Option packages required by the example | CustomizedControls add-on (shipped with the example archive) | Same |
For the TIA Portal migration path the same prerequisites apply to the TIA Portal project that receives the migrated WinCC Professional runtime:
- TIA Portal V14 SP1 or later with the WinCC Professional option package installed.
- All TIA Portal option packages and Hardware Support Packages (HSP) used by the destination project must be installed on the engineering station. The TIA Portal Openness API documentation states explicitly: "Each TIA Portal option package or HSP used in the project has to be installed for an Openness application to be able to open or attach to the project." See Connecting to the TIA Portal – TIA Portal Openness API documentation.
- The TIA Portal WinCC Professional target runtime must equal or exceed the source runtime build; cross-down-migrations are not supported.
5. Resolution Path A – Upgrade the WinCC V7 Installation
- Open SIMATIC Manager > Help > About and record the current WinCC version and the installed service pack. If the version is below V7.2, plan an in-place upgrade.
- Download the required WinCC V7.2 (or later) base install plus the latest update from the Siemens support portal. The download entry for the example lists the supported WinCC version in the Filter criteria block; do not skip this check.
- Stop all WinCC services:
net stop "S7WINCCBXIN_x64",net stop "CCProjectMgr",net stop "WinCC_PM". Closing WinCC Explorer is not sufficient; the services must be stopped. - Run the WinCC V7.2 setup with Upgrade installation. The setup detects the existing V7.0 databases, performs the schema upgrade, and re-registers the AlarmLogging COM server under
HKCR\CLSID\{...}\InProcServer32. - Apply the latest available Update package and restart the system.
- Open WinCC Explorer on the local machine, then close it again. This forces the registry to be written for the configured server = local hostname.
- Copy the original
CustomizedControls.mcpfolder toC:\CustomizedControls\again (do not reuse the partially migrated tree) and double-click the.mcpfile. The project manager will detect the schema version, prompt for upgrade, and write the SQL configuration databases in the same pass.
6. Resolution Path B – Migrate the Example to TIA Portal WinCC Professional
If the target environment is TIA Portal (which is what the original poster also tried), the migration must start from a WinCC V7.2 or later source install. The migration of a V7.0 SPx project to TIA Portal V14+ is not supported by Siemens and will always fail with the 0x80046107 alarm logging schema error.
- Perform Path A first on a maintenance workstation so the source
.mcpis upgraded to V7.2 or V7.5. - Install TIA Portal V16 or V17 with the WinCC Professional option package. TIA Portal V18 / V19 / V20 are also valid migration targets; pick the version that matches the rest of your project fleet.
- In WinCC Explorer, open the upgraded example and run Tools > Migration > Migrate WinCC Project to TIA Portal. The wizard exports an .apxx or an intermediate folder tree containing the converted pictures, tag tables, alarm classes, and the CustomizedControls add-on metadata.
- Launch TIA Portal, create a new WinCC Professional project, and select Project > Migration > Import WinCC V7 project. Point to the intermediate folder.
- Confirm that the project compiles. If compilation fails with Alarm Logging: source not found, the source archive is missing the
AlarmLogging.xmlschema file. Restore it from the original Siemens download or rebuild the alarm classes in TIA Portal manually. - Compile, download to the WinCC RT Professional runtime, and verify alarms with a forced tag toggling test.
7. Resolution Path C – Re-Register WinCC COM Components Without Reinstall
On workstations where the WinCC version is already correct but the COM registration is broken (for example after a Windows feature update), the migration can be repaired without a full upgrade:
- Open an elevated command prompt.
- Re-register the Alarm Logging COM server:
regsvr32 "C:\Program Files (x86)\Siemens\Automation\WinCC\bin\CSAlarmLogging.dll" - Re-register the project manager shell:
regsvr32 "C:\Program Files (x86)\Siemens\Automation\WinCC\bin\CCProjectMgr.dll" - Re-register the graphics runtime:
regsvr32 "C:\Program Files (x86)\Siemens\Automation\WinCC\bin\Graphics.dll" - Restart the WinCC Project Manager service:
net stop "CCProjectMgr" && net start "CCProjectMgr" - Retry opening the
.mcpfile. If the COM HRESULT persists, the project archive is genuinely from a newer WinCC build; proceed to Path A.
8. Detailed Migration Log Interpretation
The log format that the migration wizard writes is fixed and field-engineer friendly. The two entries captured in the original failure look like this:
PROJECT NAME: C:\CustomizedControls\CustomizedControls.mcp
PROJECT TYPE: unknown
MIGRATION OBJECTS: pictures and libraries
START TIME: 2014-03-18 11:07:34
ERROR: Error while opening WinCC project. hr=0x80046107
--> CS AlarmLogging could not be updated.
FINISH TIME: 2014-03-18 11:07:36
Migration finished with errors.
The fields have the following meaning:
| Field | Meaning |
|---|---|
| PROJECT TYPE: unknown | The wizard could not determine whether the source is a single-user, multi-user, or redundant project. The schema probe on AlarmLogging failed before the type could be classified. |
| MIGRATION OBJECTS | The list of components the wizard intended to migrate. In this archive only pictures and libraries are listed, which means Alarm Logging, Tag Logging, and the user administrator were already excluded by the type probe. |
| START / FINISH TIME delta | The 2-second delta in the first log and 1-second delta in the second log are characteristic of an early-abort on COM instantiation, not a real migration attempt. |
| hr=0x80046107 / 0x80046127 | Both belong to the WinCC COM error class (FACILITY_WINCC, 0x8004 + component code). Decoded with err.exe from the Windows SDK they expand to WINCC_E_ALARMLOGGING_NOT_UPDATED and WINCC_E_ALARMLOGGING_CLOSE_FAILED respectively. |
A successful migration log would show PROJECT TYPE: Single-User Project or PROJECT TYPE: Multi-User Project, a MIGRATION OBJECTS list including alarm logging, tag logging, user administrator, text library, picture tree, and a Migration finished successfully line.
9. Common Pitfalls That Mimic This Error
| Symptom | Real cause | Fix |
|---|---|---|
| Same HRESULT on a different example | Missing WinCC Option package (e.g. WinCC/Connectivity Pack, WinCC/Audit, WinCC/Redundancy) referenced inside the .mcp | Install the missing option on the workstation, not just the base V7.2 install |
| Migration succeeds once then fails on the second run | Previous run left the SQL Express instance attached to the configuration DB; AlarmLogging cannot take an exclusive lock | Stop all WinCC services, run SQL Server Management Studio, detach the WinCC.mdf manually, retry |
| Error appears only on Windows Server 2019 / 2022 | DCOM hardens between Windows releases; the AlarmLogging service cannot authenticate the project manager user | Add the WinCC user to the local group Distributed COM Users and the SQL group SQLServerMSSQLUser$ |
| CustomizedControls add-on shows as "not registered" in TIA Portal | Add-on is shipped inside the .mcp archive but its setup is a separate package that must be run on the engineering station first | Run the CustomizedControls_Setup.exe from the example download, restart TIA Portal |
| Migration aborts with hr=0x80046107 after a Windows cumulative update | The update reset DCOM permissions to the Windows default; WinCC COM cannot launch out-of-process | Repair the DCOM permissions with the WinCC Security Controller tool, then restart the project manager |
10. Verification Steps
- Open WinCC Explorer on the local station. The left-hand tree should show the project under the configured server with the alarm logging, tag logging, and graphics components marked as active (green dot).
- Right-click Alarm Logging and select Open. The alarm editor should display the configured message classes. If the editor returns Cannot open configuration, the AlarmLogging COM server is still unregistered – repeat Path C.
- Open the Graphics Designer and load any picture from the example. Confirm the CustomizedControls faceplates render without the OCX not registered error.
- In the runtime, start WinCC Runtime and force a tag change with the Tag Simulator. The configured alarm should appear in the alarm view within the configured acknowledgement interval.
- Re-run the migration wizard. The log should now show PROJECT TYPE: Single-User Project (or Multi-User) and Migration finished successfully.
11. Commissioning Checklist After the Fix
- Confirm the SQL Server Express instance assigned to WinCC is running and the WinCC database is attached. Use
sqlcmd -S .\WinCC -Q "SELECT name FROM sys.databases WHERE name = 'WinCC'"and verify a single row is returned. - Confirm the WinCC user has the right to start and stop the project manager service:
sc sdshow CCProjectMgr. The output should containA;;CCLCSWRPWPDTLOCRRC;;;S-1-5-32-544(local administrators) and the WinCC operator group SID. - Confirm the firewall allows DCOM and SQL traffic on the local subnet. On a single-station install this is a no-op; on a multi-user install the SQL port 1433 + the DCOM port range 135 + ephemeral must be open between the project server and clients.
- Back up the migrated project with WinCC Project Duplicator before commissioning. The duplicator writes a
.ziparchive with the same internal layout as the original.mcp, which can be restored on a clean workstation without re-running the migration.
12. Long-Term Recommendation
Operating WinCC V7.0 SPx in 2024+ is no longer advisable for new installations. The V7.0 mainline reached end of standard support, and many Siemens-published example archives have moved to V7.5 SP2 or higher. For plants that must keep an older V7 base, install the example on a parallel engineering station with a current V7.2+ install, migrate the example there, and only then export the converted .mcp to the production fleet. For new engineering, deploy TIA Portal V18+ with WinCC Professional V18 from the start. The Openness API requirement – install every option package and HSP used by the project – is the single most common reason a "clean" TIA Portal install cannot open a project archive that compiles elsewhere; verify it on the engineering station before importing anything.
13. FAQ
What does HRESULT 0x80046107 mean in a WinCC V7 migration log?
It is the WinCC COM error code for the AlarmLogging configuration database that could not be opened, attached, or schema-updated. The migration wizard raises it when the WinCC runtime version on the workstation is older than the project schema version, or when the project manager for the configured server is not running.
Can I open a WinCC V7.2 example project on a V7.0 SPx install?
No. The example "Customizing of WinCC Runtime Professional Controls" is built against the V7.2 schema. V7.0 SPx cannot service the schema upgrade on AlarmLogging, so the migration aborts with hr=0x80046107. Upgrade the workstation to WinCC V7.2 or later, or migrate the project to TIA Portal WinCC Professional V16+ from a V7.2+ source install.
Why does the migration wizard say "Project manager for configured WinCC Server is not already running"?
The wizard will not start the project manager service on its own. It expects WinCC Explorer to be open on the server listed in HKLM\SOFTWARE\Siemens\WinCC\Project<n>\Server. Open WinCC Explorer on that server first, then retry the migration. On a single-station install the server name must equal the local hostname; rename the project or use the WinCC Project Duplicator to fix a mismatched server name.
Does the TIA Portal Openness API requirement for option packages apply to manual migrations too?
Yes. The TIA Portal Openness API documentation states that every TIA Portal option package and Hardware Support Package (HSP) referenced by the destination project must be installed on the engineering station, or the project cannot be opened or attached. A manual import through Project > Migration > Import WinCC V7 project uses the same Openness entry points and follows the same rule. See the official documentation at Connecting to the TIA Portal – TIA Portal Openness API documentation.
Is it safe to delete the partial project folder after a failed migration?
Yes. The migration wizard leaves the original GraCS and Library subfolders untouched, but the configuration databases are not written until the migration succeeds. Delete the folder, re-extract the original Siemens archive to C:\CustomizedControls\, apply the WinCC version fix, and re-run the migration. Never modify the .mcp file by hand; the file header contains a version stamp that the wizard validates before opening the project.