Security error when trying to connect

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Dorru
Posts: 45
Joined: 16 Dec 2008, 13:45

Security error when trying to connect

Postby Dorru » 23 Jan 2009, 16:46

Getting this when I'm trying to connect to SFS during debug (Ctrl + Shift + Enter) mode in Adobe Flash:

Code: Select all

SecurityError: Error #2010: Local-with-filesystem SWF files are not permitted to use sockets.
   at flash.net::Socket/connect()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/connect()[C:\SmartFoxServerPRO_1.6.2\Flash API\Actionscript 3.0\it\gotoandplay\smartfoxserver\SmartFoxClient.as:766]
   at it.gotoandplay.smartfoxserver::SmartFoxClient/it.gotoandplay.smartfoxserver:SmartFoxClient::onConfigLoadSuccess()[C:\SmartFoxServerPRO_1.6.2\Flash API\Actionscript 3.0\it\gotoandplay\smartfoxserver\SmartFoxClient.as:2442]
   at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/flash.net:URLLoader::onComplete()


Got it once while I tried the client in normal mode (not debug), and during the session I got the error the client froze alot while walking around and so on.

Any solution for my problem?

I'm also using OpenSpace. :)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 Jan 2009, 05:02

You should change your Flash publish settings from Local-with-filesystem to Local-with-network

Go to File > Publish settings > Local Playback security
Lapo
--
gotoAndPlay()
...addicted to flash games
Dorru
Posts: 45
Joined: 16 Dec 2008, 13:45

Postby Dorru » 24 Jan 2009, 12:05

Lapo wrote:You should change your Flash publish settings from Local-with-filesystem to Local-with-network

Go to File > Publish settings > Local Playback security


Hmm, thanks, but then I get this instead:

Code: Select all

*** Security Sandbox Violation ***
Connection to file:///C|/xampp/htdocs/The%20Client/config/sfsClient.xml halted - not permitted from file:///C|/xampp/htdocs/The%20Client/client.swf
SecurityError: Error #2148: SWF file file:///C|/xampp/htdocs/The%20Client/client.swf cannot access local resource file:///C|/xampp/htdocs/The%20Client/config/sfsClient.xml. Only local-with-filesystem and trusted local SWF files may access local resources.
   at flash.net::URLStream/load()
   at flash.net::URLLoader/load()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/loadConfig()[C:\SmartFoxServerPRO_1.6.2\Flash API\Actionscript 3.0\it\gotoandplay\smartfoxserver\SmartFoxClient.as:690]
   at client_fla::MainTimeline/onJoinBtClick()[client_fla.MainTimeline::frame1:65]
Cannot display source code at this location.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Jan 2009, 08:22

Sorry, could you give us more details on the version of Flash, SFS etc...
We've never encountered such a problem, especially when running inside the IDE.
Please stick to the posting rules as much as possible:
viewtopic.php?t=3307
Lapo

--

gotoAndPlay()

...addicted to flash games
maxisilva
Posts: 3
Joined: 22 Apr 2016, 21:53

Re: Security error when trying to connect

Postby maxisilva » 20 Nov 2016, 21:11

I know this is kind of old, but if someone comes across this exact case (as I did), I found a solution.

You need to add the SWF directory to the Flash Player trusted directory so it can access both remote (sockets) and local files. I needed to do this to be able to debug while previewing the Movie in Adobe Animate.

How to here:
http://help.adobe.com/en_US/as3/dev/WS5 ... 485BF39CBF
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Security error when trying to connect

Postby Lapo » 21 Nov 2016, 08:57

Well yes, if you are testing in the standalone Flash Player your SWF must be trusted. But in the browser, there's no need for this.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 45 guests