java.net.SocketPermission error

ColdFusion Add comments

I have been having a problem on a sandboxed CFMX7 server where by clients would get the following error unless a sandbox is created for their site.

 

Security: The requested template has been denied access to <domain name>.

 

The actual cf error you will get in the debug output is

 

access denied (java.net.SocketPermission <domain name> resolve)

 

The reason for this error is because they have enabled session management in their application.cfm, exactly why this would result in a SocketPermission error I do not know, but here Is the work around.

 

You should have a default (top level) security sandbox where you are disabling certain tags and functions by default for the WWWROOT or wherever your web sites are stored. In this sandbox you need to explicity allow the IP address of the server on port 80 under the Server/Ports tab. The the error will no longer occur and you will no longer need to setup a security sandbox just to allow session management.

 

You may find that this error also occurs when making connections to other resources, like database servers (I have a similar issue with MySQL connections on this same server), and adding the server IP and port for the remote server shoudl also work in the same way.

0 responses to “java.net.SocketPermission error”

Leave a Reply

Leave this field empty

Powered by Mango Blog. Design and Icons by N.Design Studio