1. Problem Description
An MP277 Multi Panel running WinCC flexible 2008 SP2/SP3 (or later) RT is configured to store recipe data sets on a Windows file share. The engineering project defines a recipe storage path of the form \\network\PC\Recipes created through the net use command from the panel's command prompt (Start → Programs → Command Prompt). File-system operations performed from the panel's own Windows CE Explorer (creating text files, deleting files, copying executables) succeed against the same UNC path. As soon as the operator opens the Recipe View on the HMI page and tries to download (write) a data record, the status line of the recipe view displays:
The corresponding entry in the MP277 diagnostics buffer (accessible from the panel via Start → Settings → System → MiniWeb → Diagnostics, or via the WinCC flexible Tools → Device Diagnostics route) is:
| Message number | Timestamp | State | Message text |
|---|---|---|---|
| 130005 | 18/02/2010 09:54:43 | C (Error coming) | The file is write-protected. Operation will be aborted. |
The same fault is observed on every recipe record that targets the network path. Local recipes (storage location "On the panel") continue to work normally.
2. Root Cause Analysis
WinCC flexible recipe management opens the target file through a non-interactive Windows CE service context. When the UNC path \\PC\Recipes\... is resolved by the panel, the runtime is not the user that opened the net use shell session. Several conditions interact to produce error 130005:
-
Name resolution failure. The MP277 cannot resolve the NetBIOS name
PCthrough its default name-resolution chain (DNS first, NetBIOS over TCP/IP fallback). Becausenet usesucceeds from the interactive shell, the panel quietly uses an LMHosts cache populated by the shell session. The recipe service re-resolves the name and fails, returning a "share not available" condition that the recipe layer surfaces as write-protected. -
Drive mapping not inherited.
net usecreates a per-logon-session drive letter inside the shell. The recipe runtime runs under the CE system's service account and does not inherit this mapping. A UNC path that worked in the shell becomes "access denied / write-protected" for the service. - SMB signing mismatch. The Windows XP share host must allow LMCompatibilityLevel 1 or 2; if the host has been hardened to "Send NTLMv2 only / refuse LM&NTLM", every CE-side write fails with 130005 even though Explorer appears to write (because Explorer uses a cached handle with different signing).
- Read-only attribute on the file. When the recipe runtime re-creates the data record and the existing file inherits a read-only flag from the Windows share default, the panel aborts with 130005.
- Folder-level ACL on the share. The share is set to Everyone / Full Control but the underlying NTFS folder applies Read-Only to anonymous or unauthenticated connections, which is what the CE service issues.
3. Pre-Diagnostic Checklist
Confirm the following baseline before changing any configuration:
- From the MP277 command prompt, run
net view \\PC. The share list must appear; otherwise the panel cannot reach the host at all. - Run
dir \\PC\Recipes > \Storage Card\test.txt, then opentest.txtwith the on-board editor. The directory listing must be retrievable. - Run
echo test > \\PC\Recipes\writetest.tmp. If this fails, the share is the problem, not the recipe function. - From the engineering station (where WinCC flexible is installed) launch Start → Programs → Siemens Automation → WinCC flexible → Tools → Device Diagnostics and inspect the Diagnostic Buffer of the MP277. Look for events 130001–130010 grouped around the time the operator triggered the recipe save.
- On the Windows XP host, open Computer Management → Shared Folders → Open Files while a recipe save is in progress. If the file is listed under the
MP277$or anonymous session, the session itself is fine and the problem is at the recipe application layer.
4. Solution A — Configure LMHosts Name Resolution
The most common cause of intermittent "works in shell, fails in recipe" behaviour is missing NetBIOS name resolution. The MP277 must be able to translate PC into the IP address of the Windows host before the recipe service opens a handle.
Procedure:
- On the configuration PC, create the file
C:\Windows\System32\drivers\etc\LMHosts.sambackup if it does not already exist. - Create a new file in the same folder named exactly
LMHosts(no extension). Windows Explorer typically hides the extension ofLMHosts.sam; if you let Explorer create the file asLMHosts.samit will not be parsed. - Add a line in the form
192.168.1.50 PC #PREwhere192.168.1.50is the IP of the Windows share host andPCis the NetBIOS name you are referencing from the recipe path. The#PREtag forces the entry to be preloaded into the NetBIOS name cache at boot. - From a Windows command prompt, run
nbtstat -Rto reload the LMHosts cache, thennbtstat -cto confirm that the entry appears with a status ofPERMANENTorSTATIC. - Transfer the LMHosts file to the MP277. Place it under
\Flash\LMHostsor\Storage Card\LMHosts; the WinCE image reads it at boot if the registry keyHKLM\Comm\Tcpip\Hostsis set to1. - Reboot the MP277. Open the control panel's Network & Dial-up Connections → LAN → Properties → Name Servers tab and confirm that Enable LMHosts Lookup is checked.
Refer to the Siemens support entry on LMHosts configuration for the canonical MP/Comfort Panel procedure: Siemens Support: LMHosts configuration for panels.
5. Solution B — Permanent UNC Path via the WinCC flexible Recipe Tag
Because the runtime service does not inherit drive mappings, the recipe storage location must be specified as a UNC path directly inside the WinCC flexible project, not via a drive letter created at runtime.
- In WinCC flexible ES, open the project and select Recipes → Recipe_X → Properties.
- Set Storage location to Path and enter the value as a UNC string, for example
\\PC\Recipes\Line1. Do not use a mapped drive letter. - Under Runtime Settings → Services, ensure the option Use service for file operations is enabled (default).
- Compile and transfer the project to the MP277. Verify the new project state by reading System → Operating System → Project version on the panel.
- On the Windows share host, open Local Security Policy → Local Policies → Security Options → Network security: LAN Manager authentication level and set it to Send LM & NTLM responses. The Windows CE / XPe image on the MP277 only supports LM/NTLMv1.
- Restart both the panel and the share host so the SMB session cache is rebuilt.
6. Solution C — Sm@rtAccess / Thin Client Recipe Mirroring
When the engineering target is to keep two or more MP277 panels and one WinCC flexible Runtime on a PC in sync on the same recipe data, the most reliable pattern is to publish the recipe from a single owner and let the other stations mirror it via Sm@rtAccess (later re-branded as SmartClient in TIA Portal).
- Designate one MP277 (or the WinCC flexible Runtime PC) as the recipe owner.
- Enable Sm@rtService on the owner and Sm@rtAccess on each consumer.
- Define an Area on the owner that contains the recipe tags. Configure the area as a publish/subscribe zone.
- On each consumer, import the area and bind the imported tags to its own recipe view. The consumer panel does not perform its own file I/O on the share; it only reads/writes tag values, which are mirrored through the Sm@rtAccess channel.
- Validate that all panels in the zone are listed under Start → Sm@rtAccess → Connections on the owner.
This approach eliminates the file-share layer for the recipe update path. The share is then used only for archive exports, which are far less time-sensitive and tolerate the SMB-1 latency.
7. WinCC Flexible Engineering Configuration Reference
The following table summarises the recipe-related project settings that influence error 130005 on a network share.
| Setting | Path in WinCC flexible | Recommended value | Notes |
|---|---|---|---|
| Storage location | Recipes → Properties → Storage | Path: \\<host>\<share>\<folder>
|
Never a drive letter |
| Synchronous write | Recipes → Properties → General | Enabled | Avoids cache-only loss if power is removed |
| Number of data records | Recipes → Properties → Data Records | Match process | Limit to < 200 to keep file size under SMB-MTU |
| Service context | Runtime → Services → File Service | Enabled | Disables process-wide impersonation |
| Recipe view fault message | Recipe View → Properties → Status | Visible | Required so 130005 is shown to the operator |
| Import / export directory | Recipes → Properties → Import/Export | Match storage path | Avoid double share traffic |
8. RT Loader Settings for a Networked Runtime
If the recipe owner is a WinCC flexible Runtime on a PC rather than an MP277, the transfer from the configuration PC to the visualisation PC is performed by the RT Loader. The settings below are taken from the Siemens support entry How do you configure the RT Loader to transfer a WinCC flexible Runtime file from the configuration computer to a visualization PC?:
- On the configuration PC, start WinCC flexible → Tools → RT Loader.
- In the Transfer settings dialog, choose Transfer from configuration computer and select Ethernet.
- Enter the target PC's IP address. The destination computer must be running the WinCC flexible Runtime service and must respond to ping.
- Activate the option Start Runtime automatically after transfer when the visualisation PC is intended to remain headless.
- Ensure that the Windows Firewall on the visualisation PC allows inbound TCP 2308 (WinCC flexible transfer) and TCP 445 (SMB).
- On the visualisation PC, the recipe storage path must be a UNC string as described in Section 5; the RT Loader only moves the project, not the runtime data, so the recipe path is taken from the compiled project.
%ProgramData%\Siemens\Automation\WinCC flexible\Recipes to the network share before the RT Loader runs.9. Multi-Panel Recipe Synchronization Architecture
The end goal expressed in the source — "two MP277 and one WinCC flexible Runtime use the same recipe" — can be implemented by one of three topologies:
| Topology | File share role | Failure mode addressed | Limitations |
|---|---|---|---|
All panels write to \\PC\Recipes
|
Single source of truth | Local panel storage loss | Concurrent writes require file-lock discipline; risk of 130005 if any node is not authenticated |
| One owner, others via Sm@rtAccess | Archive only | Service-context authentication | Requires owner to be online; no offline panel edits |
| Periodic import/export | Transfer staging area | Authentication | Not real-time; operator must trigger |
For a line with two MP277 operator stations and a WinCC flexible Runtime engineer station, the second topology (Sm@rtAccess with archive share) is the only one that removes the write-protected error class entirely.
10. Verification and Acceptance Test
After any of the solutions above, perform the following acceptance sequence:
- Open the recipe view on the MP277 and write a data record to the network share. Confirm in MiniWeb diagnostics that no event 130005 is logged.
- From the Windows XP host, browse to the share and confirm that the new record file exists and is not read-only.
- Modify a recipe element from the WinCC flexible Runtime on the PC. Confirm that the change appears within the polling interval (default 1 s) on both MP277 stations.
- Power-cycle one MP277. On reboot, confirm that the recipe view shows the latest data record (recipe persistence verified).
- From the engineering station, run a recipe export to
\\PC\Recipes\Export. Verify that the CSV file opens in Excel without manual conversion. - Stress-test by writing ten records in rapid succession. Confirm that no 130005 events appear and that no zero-byte stub files remain in the share.
11. Related Error Codes
| Event ID | Meaning | Likely cause | Remediation |
|---|---|---|---|
| 130001 | File not found | UNC path or LMHosts wrong | Verify net view / LMHosts entry |
| 130002 | Path not found | Folder missing on share | Create folder, re-apply ACL |
| 130005 | File is write-protected | Service cannot write / file attribute set | Use UNC + LMHosts, clear RO attribute |
| 130010 | General I/O error | SMB session dropped | Check network, disable SMB signing |
| 130020 | Disk full | Share quota exceeded | Free disk, raise quota |
| 140001 | Recipe data invalid | Tag type mismatch after project change | Re-import data records |
12. Field-Engineering Notes
- Always enter the MP277's own name (Panel1, Panel2, ...) into the
LMHostsfile of every PC that opens a UNC path back to a panel. The reverse direction (panel-to-PC) is the one that fails most often and is the one error 130005 exposes. - Disable Force guest on the Windows share. The MP277 authenticates as
ANONYMOUS LOGONwhen the LMCompatibility level is high; a guest mapping does not return GENERIC_WRITE. - Recipe files created by WinCC flexible are CSV with a 4-byte header. Keep them under 4 MB to stay within a single SMB-1 trans2 response.
- When migrating an existing project from WinCC flexible to TIA Portal (WinCC Comfort/Advanced), the recipe path syntax is preserved but the runtime service context becomes WinCC RT Service; the LMHosts procedure still applies.
- Do not store the recipe on a DFS namespace root; the WinCE redirector cannot follow DFS referrals and returns 130005.
Why does the MP277 Explorer create files on the share but the recipe view fails with 130005?
The Explorer and the recipe runtime run in different process contexts. Explorer uses the user session created by net use, while the recipe runtime runs under the system service context which does not inherit the mapping and which resolves the UNC name through a different NetBIOS path. Configure an LMHosts entry on the panel pointing to the share host and use a UNC path (not a drive letter) in the recipe properties.
Where exactly must the LMHosts file be placed on the MP277?
Copy the file as LMHosts (no extension) to \Flash or to the root of the storage card. Then enable Enable LMHosts Lookup in the panel's LAN properties and reboot. Confirm with nbtstat -c from a remote Windows host that the entry is cached.
Does Windows authentication level on the share host affect error 130005?
Yes. The Windows CE / XPe image on the MP277 supports LM and NTLMv1 only. If the share host is set to Send NTLMv2 only / refuse LM&NTLM the panel can list files but every write attempt returns STATUS_ACCESS_DENIED, which the recipe layer reports as 130005. Set LAN Manager authentication level to Send LM & NTLM responses on the share host.
How do I share one recipe between two MP277 panels and a WinCC flexible Runtime PC?
The recommended pattern is to designate one device as the recipe owner, enable Sm@rtService on it, and have the others subscribe via Sm@rtAccess. The file share is then used only for archive export. This removes the service-context write issue that produces 130005.
What RT Loader settings are required when the recipe owner is a WinCC flexible Runtime PC?
Open RT Loader on the configuration PC, set the transfer mode to Ethernet, enter the visualisation PC's IP, and enable automatic Runtime start after transfer. Allow TCP 2308 and TCP 445 through the Windows Firewall on the target. See the Siemens support entry 29054992 for the complete procedure.