Troubleshooting
Why Sm@rtServer browser access fails with a SocketPermission error
Short answer
The Access denied (java.net.SocketPermission) dialog is raised by the Java runtime on the viewing PC, not by the WinCC flexible runtime: its sandbox and java.policy file refuse the socket the Sm@rtServer applet must open back to the runtime. Add a connect,resolve grant for the runtime address on the applet's two ports and put the server URL on Java's Exception Site List, or skip Java and run the standalone SmartClient executable.

On this page
Opening the Sm@rtServer page of a WinCC flexible runtime in a browser should bring the runtime screen up in a Java applet. When the session instead stops at an Access denied java.net.SocketPermission dialog, the runtime itself is usually innocent: that message comes from the Java installation on the viewing PC, whose sandbox and policy file refuse the socket the applet must open back to the runtime. Fix it on the client — grant connect,resolve for the runtime address on the applet's two ports in java.policy and put the server URL on Java's Exception Site List — or drop the browser entirely and run the standalone SmartClient executable, which needs no Java at all. This article gives the ports involved, the exact lines to add, the Java settings that gate the applet, and the way to tell this client-side failure from a server-side one.
Where the SocketPermission error comes from #
The Sm@rtServer browser page launches a Java applet, and an applet runs inside the sandbox of the Java installation on the viewing PC. Every socket an applet opens is checked against that sandbox and its policy file at the moment the socket is requested. When no grant covers the address the applet dials — typical with Sm@rtServer when the page is opened under one address while the applet dials another, for example a name instead of the raw IP or a second interface of the same machine — the runtime refuses the call and shows Access denied. The dialog reads Access denied (java.net.SocketPermission "<server-ip>" "connect,resolve"): the quoted address is the destination the applet tried to reach, the Sm@rtServer machine rather than the viewing PC, and connect,resolve are the refused actions.
This is why the usual shots in the dark change nothing. Reinstalling or downgrading Java swaps in another JRE with the same stock policy; a different browser still drives the same plug-in; firewall and antivirus settings never come into play because the refusal happens inside the JRE before any packet leaves the PC. The vendor documents the Java settings for the browser client in its Sm@rtServer Java security support entry, 101977510.
You are looking at exactly this failure when all of the following hold:
- the dialog appears before any runtime screen data arrives
- the message names
java.net.SocketPermissionwithconnect,resolve - the runtime keeps running and answers on the network
- every browser and every Java version you tried shows the same dialog
The ports the applet must reach #
A Sm@rtServer browser session opens two TCP channels from the client to the runtime: port 5800 serves the applet's HTTP page, and port 5900 is the VNC display channel that repaints the runtime screen. The grant has to name both; a grant for only one leaves the applet stopping at the next socket it opens. If the Sm@rtServer settings on the device were moved off these defaults, the grant must name the ports actually configured, because the entry is matched against address and port exactly as written.
While you are in those settings, set the Sm@rtServer connection password and keep the two ports inside the plant network: a runtime screen that is reachable from outside the boundary without a password is an open door.
Grant the ports in java.policy on the viewing PC #
Apply this on the viewing PC with administrator rights:
- Close every browser window and any running Java background process.
- Open the policy file of the JRE the browser plug-in uses. On a 64-bit Windows client with a 32-bit plug-in Java 8 installation it sits at
C:\Program Files (x86)\Java\jre1.8.0\lib\security\java.policy; where several update folders exist, edit the one the plug-in actually loads. - Add the two permission lines inside the file's existing grant block, with the Sm@rtServer address in place of the example 192.168.100.10:
permission java.net.SocketPermission "192.168.100.10:5800", "connect, resolve";
permission java.net.SocketPermission "192.168.100.10:5900", "connect, resolve";
- Save the file. If the editor refuses to write it, start the editor again as administrator, and afterwards confirm the file is still named java.policy with no extra extension attached.
- Open the Java control panel, switch to the Security tab and use the Edit Site List button to add the Sm@rtServer URL, http:// followed by the runtime address. Without this entry the plug-in can block the applet before the policy is ever consulted.
- Restart the browser, open the Sm@rtServer page again and accept the Java prompts.
The policy file is read when the applet's Java VM starts, so the browser restart in the last step is what makes the new grants visible; an applet left running from before keeps the old denials.
Skip Java with the standalone SmartClient #
The browser applet is one of two delivery paths, and the second carries no Java at all. WinCC flexible generates a standalone SmartClient executable from the project, and the vendor's application note 109482434 documents that the single file runs on a PC without the engineering or runtime software installed — exactly what a service laptop needs. SmartClient.exe is a plain Windows program: no JRE, no plug-in, no Exception Site List, and therefore no java.policy that could deny a SocketPermission. Copy it to the client on a USB stick or a file share and point it at the runtime address.
The session it opens stays confined to the runtime screen, like the browser path. That confinement is the point: a generic VNC viewer against the same PC would expose the whole desktop, not the visualization, which is usually why the browser route was demanded in the first place. SmartClient keeps the confinement and drops the Java dependency.
Separate a policy failure from a server-side failure #
Work through the path in this order and the cause names itself:
- TCP reachability: from the client, test both channels from a command prompt —
telnet 192.168.100.10 5800with the Telnet client installed is the quick check. A cursor on an otherwise blank screen means the channel answers; Connection refused means nothing is listening on the runtime, which is a server-side problem; a timeout means the network path or a filtering firewall, not the policy. Repeat the test on the second channel. - Policy: if both channels answer and the dialog still says SocketPermission, apply the grant above. That combination is the signature of the client-side failure.
- Server settings: if the channels answer but the server refuses the login, the cause sits in the Sm@rtServer settings on the device, which decide who may connect at all. Refused connections on a KTP900 Basic panel are worked through step by step in Why KTP900 Basic Sm@rtServer Refuses Remote Client Connections.
- Other device-side answers: Sm@rtServer decisions surface on the client in other forms too. Comfort panels, for instance, report an unencrypted VNC connection when a client attaches without encryption, as covered in Comfort Panel Sm@rtServer reports an unencrypted VNC connection. The same access-denied wording on a TP1500 Comfort usually has a server-side cause instead of a Java policy, and Resolving TP1500 Comfort Sm@rtServer Access Denied Errors walks through that case.
The decision #
Two cases, two decisions:
- The viewing PCs are few and fixed and the browser workflow must stay: add the two permission lines for the runtime address on the applet's two ports inside the existing grant block, put the server URL on the Exception Site List, restart the browser. The setup holds until a Java update brings a fresh stock policy, at which point the lines go back in.
- The clients vary, or Java cannot be held at the plug-in era at all — the browser plug-in ended with the Java 8 line, so any newer JRE has no applet path regardless of the policy: generate the standalone SmartClient executable and hand that out. One file, no Java dependency, and the SocketPermission failure mode cannot occur.
Either way the session stays limited to the runtime screen, with the Sm@rtServer password and the plant network boundary in place.
Questions asked
If several Java versions are installed, which policy file does the browser use?
The applet runs under the JRE that the browser plug-in is registered to, not under the newest installation on the PC. Check which runtime the Java control panel lists for the plug-in, add the grant in that installation's security folder, and leave the others alone. Adding yet another Java version changes nothing while the grant is missing from the file the plug-in actually reads, which is why swapping Java versions never cleared the error.
Does the policy grant affect other Java applications on the client?
A grant written for one address and the applet's two ports lets Java open sockets only to that destination; every other connection stays inside the stock sandbox. Keep the two permission lines inside the existing grant block of java.policy instead of replacing the file, so the default rules survive for all other applets and Web Start applications on the same machine.
How do I apply the fix to more than one viewing PC?
The policy file lives on each client, so every viewing PC needs the same permission lines, added in the JRE installation that machine actually loads. For anything beyond a fixed pair of service PCs, generate the standalone SmartClient executable from the project and distribute that instead; it carries no Java dependency, so no client needs a policy change at all.
Does a Java update remove the grant?
Yes. An updated Java 8 runtime installs into its own folder with a stock policy file, so the permission lines have to be added again inside the new installation's security folder before the browser client works. The standalone SmartClient executable reads no policy file, so a Java update on the viewing PC cannot break it — one more reason to prefer it on clients you do not administer.

