Air + sockets = security error
Hello All,
I'm trying to create a socket connection to a java progam locally, I'm able to connect to the java sockets locally with flex, but when I build Air with the same piece of code, I'm not able to go and get a connection, as it has security restrictions, I read somewhere that an application which is local to the file system, it cannot call sockets, but, how do I make it local to file system + networking? I mean atleast get the sockets to work?
Thanks much!
bump!
Similar Messages
-
Hi,
I'm trying to make a socket connection using AS3. I am aware
of the new Security policies. I've read all the articles and set up
a socket policy file server and a socket server to handle the
socket.connect().
Im calling
Security.loadPolicyFile("xmlsocket://myhost.com:843") but
continually get this message in the debugger:
Error: Failed to load policy file from
xmlsocket://myhost.com:843 // why did it fail?? the file is there
and port is open
and then:
Error: Request for resource at xmlsocket://myhost.com:11500
by requestor from
http://myhost.com/myswf.swf
has failed because the server cannot be reached. // why can't the
server be reached?? the port is open
I've made sure I have no firewall blocking the port, no
SELinux enabled policies, and I've verified port 843 and 11500 are
actually open using a custom php script.
Also when I type nmap localhost port 843 shows up as open
using tcp. It does however say that the service is unknown. I don't
understand that since I have edited the /etc/services file and
created the service "flashpolicy" in /etc/xinetd.d and restarted
inetd using: /etc/rc.d/init.d/xinetd restart.
Heres the string my socket policy file server is suppose to
return when it receives <policy-file-request/> :
<cross-domain-policy><site-control
permitted-cross-domain-policies="master-only"/><allow-access-from
domain="myhost.com" to-ports="11500"
/></cross-domain-policy>\0
Can anyone give me some clues as to what I'm doing wrong? I
think I've read every article out there regarding this subject. I
even see that there are two bugs listed for the flash player:
http://bugs.adobe.com/jira/browse/FP-67
and
https://bugs.adobe.com/jira/browse/FP-269.
But it seems likes someone out there has achieved socket
connections with AS3.
Thank YouYou might try to force Flash to load the policy file first:
Security.allowDomain(“*”);
Security.loadPolicyFile(“http://server.com/crossdomain.xml”); -
Hi all,
My program is a client program using socket to connect to a
server program. It is success to connect server in local PC. But
when I deploy to IIS server, the client program would fail to
connect to server program using browser to run it. It show
SOCKET_SECURITY_ERROR, how can I solve it?
I tired to add trusted.cfg in
C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust and
C:\Documents and Settings\Lit\Application Data\Macromedia\Flash
Player\#Security\FlashPlayerTrust. But it is fail too.
ThanksHi Flex-Issac,
According to the new standards your server should be able to
supply socket policy file on port 843.
His means that when you create XMLSocket object and do
connect() (no need in Security.loadPolicy() if policy file is
located on the same server) FP tries to get policy file from the
server.
Server should be able to process the following request:
<policy-file request/>\0
and send back the policy file.
After FP gets the file which allows the connection on the
given port it makes the connection.
You can see what is going on in the policy.log.
How to turn the logging on is described here:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_05.html#_Using_Logging
So first thing you have to do - add more functionality to you
server and serve this socket policy file.
If you have more questions -you are welcome to ask. I am
currently doing the same thing :)
Cheers,
Dmitri. -
I have installed the Firefox 4.0 Beta 11 (+updates), I try to connect to our https: website and I receive the following error:
Secure Connection Failed An error occurred during a connection.
Renegotiation is not allowed on this SSL socket.
(Error code: ssl_error_renegotiation_not_allowed)
I have installed this certificate on Firefox 3.6.13 and I am able to connect to our HTTPS site but it will not work with the Beta 4.0 11I read about this for ages. I had problems setting up a certificate for my online banking. This one solution genuinely worked for me (finally!) ...Fingers crossed it will for you too:
1) In the address bar type in '''about:config''' ...Firefox will say it's dangerous, but I just went ahead anyway lol - It's fine. Thank god there's always an edit-undo!
2) Copy and paste this into the ''filter'' at the top: '''security.ssl.allow_unrestricted_renego_everywhere'''
3) Then change ''false'' to ''true'' (I think I just clicked it, and it changed)
That's it! Refresh your bank page, and it should work!
(Spanish source: '''http://translate.google.com/translate?sl=es&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.fedora-ve.org%2F2011%2F09%2F14%2Ferror-error-code-ssl_error_renegotiation_not_allowed-en-firefox-4-x.html&act=url''') -
Hi,
I'm trying to make socket connection from within air application, but no way. I'm browsing google for almost 2 days, follow all possible solutions, but avidently I dont understund somthing cause I'm not able to do anything.
Every time sandbox security violation..... I need make some simple socket data exchange between my air, and OS. I do not have any web server and no any other kind of network ability. I write down stupid socket server, which is waiting for policy request, and for my other requests (it function 100%, tested with Telnet, so no way to have problem on my socket server side).
The strange thing is that my application do not produce any request for socket policy file, neither at 843 port (for default), neither at my custom location with namual
Security.loadPolicyFile("xmlsocket://ip:port"); call
This is my primitive code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
private var s:XMLSocket = null;
private function test():void{
Security.loadPolicyFile("xmlsocket://127.0.0.1:25013");
if(!s){
s = new XMLSocket();
s.addEventListener(DataEvent.DATA, onData);
s.addEventListener(Event.ACTIVATE, onActivate);
s.addEventListener(Event.CONNECT, onConnect);
s.addEventListener(Event.DEACTIVATE, onDeactivate);
s.addEventListener(IOErrorEvent.IO_ERROR, onError);
s.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurity);
s.connect("127.0.0.1", 25013);
private function onActivate(e:Event):void{
debug.text += "Activated\r";
private function onConnect(e:Event):void{
debug.text += "Connected\r";
var o:XML = <request cmd="10"/>;
s.send(o);
private function onDeactivate(e:Event):void{
debug.text += "Deactivated\r";
private function onError(e:IOErrorEvent):void{
debug.text += e.text + "\r";
private function onSecurity(e:SecurityErrorEvent):void{
debug.text += e.text + "\r";
private function onData(e:DataEvent):void{
debug.text += e.data;
s.close();
]]>
</mx:Script>
<mx:Button label="Test" click="test()"/>
<mx:TextArea id="debug" width="100%" height="100%"/>
</mx:WindowedApplication>
Any help will be apresciated.
Ladislav.Hi,
It pass some time but if i remember well, my problem was that i did
not terminate stream output form my server vs air application, and it
returns this security error.
When I send '\0' at the end of my message it work correctly. Yes the
server was my own written socket server (c++ using boost libraries).
Laco.
Sorry late response I'm on hollydays
Staney G ha scritto:
So, how did you walk around the problem? Did you have a control on how server responds?
My test case failed similarly. However, the target server is a public web service.
Will appreciate your answers!
> -
Oracle Application Server crashes due to Socket Write Error
I am using Oracle Application Server 9.0.3. Simple JSP application is running on it. We are using the application server connection pooling functionality. Following errors are occuring on it frequently and it causes the application server crash.
First application response gets slow and eventually application server gets lock and it wont respond and we have to restart the application server. Our application is in production mode and we need to solve this issue immediately.
----------------Error1---------------------
com.evermind.server.http.HttpIOException: Connection aborted by peer: socket write error
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:249)
at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:424)
at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:341)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:490)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:415)
at schedule.schedulehome._jspService(_schedulehome.java:542)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
------------Error2---------------------
com.evermind.server.http.HttpIOException: Connection aborted by peer: socket write error
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:249)
at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:424)
at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:341)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:490)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:415)
at schedule.schedulehome._jspService(_schedulehome.java:557)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)I am using Oracle Application Server 9.0.3. Simple JSP application is running on it. We are using the application server connection pooling functionality. Following errors are occuring on it frequently and it causes the application server crash.
First application response gets slow and eventually application server gets lock and it wont respond and we have to restart the application server. Our application is in production mode and we need to solve this issue immediately.
----------------Error1---------------------
com.evermind.server.http.HttpIOException: Connection aborted by peer: socket write error
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:249)
at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:424)
at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:341)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:490)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:415)
at schedule.schedulehome._jspService(_schedulehome.java:542)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
------------Error2---------------------
com.evermind.server.http.HttpIOException: Connection aborted by peer: socket write error
at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:249)
at com.evermind.server.http.EvermindJSPWriter.writeOut(EvermindJSPWriter.java:424)
at com.evermind.server.http.EvermindJSPWriter.jspflush(EvermindJSPWriter.java:341)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:490)
at com.evermind.server.http.EvermindJSPWriter.write(EvermindJSPWriter.java:415)
at schedule.schedulehome._jspService(_schedulehome.java:557)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479) -
Socket security layer for 8330 curve
With no warning my company added socket security layering on our e-mail exchange server. Now all of us with blackberries cannot receive our mail on our phone. I have a 8330 curve. I'm not able to figure out if there is a setting for this. Please help!
Hi Mike8330!
I'm sorry to learn of these error messages! Let's get to the bottom of this, OK? You have "8330" in your screen name, so I'm assuming you have the Curve 8330? I did a little research on the error code you're receiving, and I recommend a master reset of the device, so the error code goes away. Here are the steps:
http://vz.to/19ILeEB
Please let me know how this goes for you, I'd like to make sure you're no longer having this issue.
Have you checked out the new Blackberry devices we offer? Ready to upgrade? Just dial #UPG send to check your upgrade eligibilty. Check out our line up here: vzw.com/products
Thank You,
ChristinaB_VZW
VZW Support
Follow us on Twitter @VZWSupport -
ADF FACES: ServletException and socket write error
Using EA17.
I have (an unfortunately) very complex page that uses a lot of partialTriggers to control components that render based on the state of other components. There are probably a dozen or so components that come and go. There are also a lot of panelGroup components to hold all the optional components and many of the controlling components are autoSubmit radio buttons. There is virtually no code (logic) in my backing bean. All the control work is being done in the .jspx page.
The exception below occurs after changing a couple of values that make components appear/disappear.
For starters, what would cause a socket write error from the servlet?
I know that this is a fairly vague request, but trying to produce a simple test case to reproduce this will be pretty difficult. So, I'm wondering if anyone has seen anything like this? Or has any suggestions on what to poke at??
Thanks.
P.S. And worst of all - it's not consistent. I can go through the same series of value/page updates and it will work one time and not the next. :-(
P.P.S. This error does not occur using Firefox as the browser. This does happen on IE 6. Unfortunately, that's the browser I have to use for internal applications. Maybe this additional information (that it appears to be browser related) will help track down the problem.
05/07/30 15:47:43 origRenderView failed!
05/07/30 15:47:43 javax.faces.FacesException: javax.servlet.ServletException: Connection reset by peer: socket write error
05/07/30 15:47:43 at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:327)
05/07/30 15:47:43 at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
05/07/30 15:47:43 at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:146)
05/07/30 15:47:43 at com.fhm.mwb.ui.view.FHMViewHandler.renderView(FHMViewHandler.java:159)
05/07/30 15:47:43 at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
05/07/30 15:47:43 at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
05/07/30 15:47:43 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
05/07/30 15:47:43 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
05/07/30 15:47:43 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61)
05/07/30 15:47:43 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
05/07/30 15:47:43 at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
05/07/30 15:47:43 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:310)
05/07/30 15:47:43 at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:183)
05/07/30 15:47:43 at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:670)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378)
05/07/30 15:47:43 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:869)
05/07/30 15:47:43 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:288)
05/07/30 15:47:43 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
05/07/30 15:47:43 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:299)
05/07/30 15:47:43 at java.lang.Thread.run(Thread.java:534)
05/07/30 15:47:43 Caused by: javax.servlet.ServletException: Connection reset by peer: socket write error
05/07/30 15:47:43 at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:753)
05/07/30 15:47:43 at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:700)
05/07/30 15:47:43 at qaFollowup2e_jspx._jspService(qaFollowup.jspx:232)
05/07/30 15:47:43 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
05/07/30 15:47:43 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:343)
05/07/30 15:47:43 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:543)
05/07/30 15:47:43 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:441)
05/07/30 15:47:43 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
05/07/30 15:47:43 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61)
05/07/30 15:47:43 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:672)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:300)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:36)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:207)
05/07/30 15:47:43 at oracle.oc4j.security.OC4JAccessController.doPrivilegedWithException(OC4JAccessController.java:186)
05/07/30 15:47:43 at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:85)
05/07/30 15:47:43 at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:211)
05/07/30 15:47:43 at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
05/07/30 15:47:43 ... 20 moreThanks for the information on this.
What I can't understand is why the first request hasn't finished. I specifically tried waiting several seconds between clicking on various components. From all visual cues (from IE) the previous request has completed and the screen has redrawn. So, the requests shouldn't be overlapping. Is there possibly something happening with the ADF javascript that could be making this happen?
When the error occurs, the page fails to update properly (i.e., the components that should now be visible due to a change in a radio button selection are not rendered). This leaves the application in an inconsistent state and the page can be filled out improperly by the end user.
I know that's a long winded way of saying "it doesn't seem innocuous, since the application state gets messed up because of the error."
Let me know if there's anything I can do to work around this.
Thanks Adam. -
Hello,
The documentation is a bit sparse on what to do with binary sockets and the security model. Particularily what it means to 'return a cross domain policy file' ( See Section 1.4.3 and 1.5.6 of Cross Domain Policy File Documentation http://learn.adobe.com/wiki/download/attachments/64389123/CrossDomain_PolicyFile_Specifica tion.pdf?version=1 )
This is what my socket server code looks like in PHP:
(PHP)
if (strcmp( substr($input,0,22), "<policy-file-request/>") == 0 ){
socket_write($socket,"<?xml version=\"1.0\"?>\n<!DOCTYPE cross-domain-policy SYSTEM\n\"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">\n<cross-domain-policy>\n<allow-access-from domain=\"*\" to-ports=\"4041\"/>\n</cross-domain-policy>\n\n");
When I run my AS3 code
var socket:Socket = new Socket();
socket.endian = Endian.BIG_ENDIAN;
socket.addEventListener(Event.CLOSE, close);
socket.addEventListener(Event.CONNECT, connected);
socket.addEventListener(IOErrorEvent.IO_ERROR, io_error );
socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, security_error );
socket.addEventListener(ProgressEvent.SOCKET_DATA, socket_data);
socket.addEventListener(Event.DEACTIVATE, close);
socket.timeout = 3000;
socket.connect(host,4041);
The client does ask for the security file, but after the server writes the security file to the socket the client socket shuts down and returns a security error.
What am I doing wrong? Should the server be outputting a URL where the crossdomain.xml is located instead? I don't understand what nuance I am missing.
Could someone please explain what I am missing?
ThanksMy problem was that I was sending binary data through the socket previous to sending the policy file. I just sent the policy file immediately upon connect and everything worked out fine. I had to add a chr(0) to the end of the policy file as well.
Thanks for your time. -
Socket write error - WL4.5.1
Hi
I have multiple clients accessing EJBs deployed on WebLogic4.5.1
When I run the clients concurrently, the server throws the following
exception and closes the client connection. This occurs with ServicePacks 7
and 9!!! Can you please help me?
Regards,
Madhavi.
The exception -
Tue Nov 07 10:33:04 MST 2000:<E> <RJVM> java.net.SocketException: blocking
winsock call in progress: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(Compiled Code)
at weblogic.socket.MBuf.writeTo(Compiled Code)
at weblogic.socket.JVMSocketT3.sendMsg(Compiled Code)
at weblogic.rjvm.ConnectionManager.sendMsg(Compiled Code)
at weblogic.rjvm.SlidingWindow.sendMsg(Compiled Code)
at weblogic.rjvm.RJVMImpl.send(Compiled Code)
at weblogic.rjvm.RJVMImpl$OutStream.flushAndSendRaw(Compiled Code)
at weblogic.rjvm.RJVMImpl$OutStream.flushAndSend(Compiled Code)
at weblogic.rjvm.RJVMImpl$OutStream.sendOneWay(RJVMImpl.java:887)
at
weblogic.rmi.extensions.AbstractRemoteObjectReference$BasicOutgoingRequest.s
endOneWay(AbstractRemoteObjectReference.java:335)
at weblogic.rmi.extensions.BasicRequest.sendOneWay(BasicRequest.java:36)
at
weblogic.rmi.internal.DGCServer_WLStub.renewLease(DGCServer_WLStub.java:121)
at weblogic.rmi.internal.DGCClientImpl$HeartBeat.execute(Compiled Code)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)YEAHHH
God bless these forums !!! thats been bugging me for ages - youve no idea , so my code that works now looks like :
public class SSLSocketClient {
public static void main(String[] args) throws Exception {
System.setProperty
("javax.net.ssl.trustStorePassword", "Passw0rd");
System.setProperty ("javax.net.ssl.trustStore", "trust.store");
Security.addProvider((Provider)Class.forName
("com.sun.crypto.provider.SunJCE").newInstance());
java.security.Security.addProvider
(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty ("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
try {
System.setProperty
("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty
("javax.net.ssl.keyStorePassword", "Passw0rd");
System.setProperty
("javax.net.ssl.keyStore", "b2b_ssltestweb.p12");
SSLSocketFactory factory =
(SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket socket =
(SSLSocket)factory.createSocket("b2b-dev.fmr.com", 443);
/* now handshare is complete and god to go */
Thanks for your help ejp,
joe -
Security Error : Multiple hosts referenced in resources
Hi,
Im attempting to use the abbot maven plugin that can download an application via webstart and run GUI tests against it.
I have got this working before, and am setting it up again, but get a webstart error that I have not seen before/can see in the forums.
Title: SystemTest1
Vendor: mycompany, inc.
Category: Security Error
Multiple hosts referenced in resources
JNLPException[category: Security Error : Exception: null : LaunchDesc: null ] at com.sun.javaws.LaunchDownload.checkJNLPSecurity(Unknown Source) at com.sun.javaws.Launcher.downloadResources(Unknown Source) at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thr
Could anyone shead some light as to where this error comes from/why??
Thanks
Jamesin any given jnlp file, all the resources must be downloaded from the same download host. In this way the SecurityManager can assign one permission collection to all the code loaded from that jnlp file (allowing socket permission only to that host).
If you have a jnl;p file with multiple resources loaded from differant hosts, re-factor the jnlp file so all of the resources loaded from a seperate host are in one component extension jnlp file.
/Andy -
Flex encounters "Security error accessing url.Unable to load WSDL"
i have created a flex application which connects to SAP via web service.
when i try to run my flex application i encounter the following error.
"Security error accessing url.Unable to load WSDL"
i went through various posts relating a BSP application and crossdomain.xml
i have created the crossdomain.xml file in the application and
i tried those options and still not able to figure out the problem.
the security error is because of the absence of the crossdomain.xml file, and in which path should i be saving the file?
Kindly help me solve the problem.
Thanks in advance.Have you seen this blog
"Crossdomain.xml" in ABAP Web AS Server cache -
Security error accessing ur unable to load wsdl
HI
I am using a webservice(.net webservice) that is on my
localhost and using it in flex application that is also on my
system. Means both the webservice and flex application are on the
same system.
But when i gives the reference of the webservice using the
system ip and run the application by the flex builder it generates
the error as:
mx.messaging.messages::ErrorMessage)#0
body = (Object)#1
clientId = "DirectHTTPChannel0"
correlationId = "24CD6542-F141-1A05-BA35-00A108CB30A0"
destination = ""
extendedData = (null)
faultCode = "Channel.Security.Error"
faultDetail = "Destination: DefaultHTTP"
faultString = "Security error accessing url"
headers = (Object)#2
messageId = "CC123DF0-0E6C-05FF-7894-00A109676283"
rootCause = (flash.events::SecurityErrorEvent)#3
bubbles = false
cancelable = false
currentTarget = (flash.net::URLLoader)#4
bytesLoaded = 0
bytesTotal = 0
data = (null)
dataFormat = "text"
eventPhase = 2
target = (flash.net::URLLoader)#4
text = "Error #2170: Security sandbox violation:
http://localhost:3000/MYCIMS/flex_bin/Design.swf
cannot send HTTP headers to
http://myip/MyServer/AdminWS.asmx."
type = "securityError"
timestamp = 0
timeToLive = 0
I have put crossdomain.xml file in the root of the localhost
and made every changes possible in the crossdomain.xml file but the
application is not running.
Please somebody provide an effective solution, I have spend
lots of time to resolve the problem but its not being....
Thanks in advance
Gopi SainiHave you seen this blog
"Crossdomain.xml" in ABAP Web AS Server cache -
Security error accessing url (Unable to load WSDL)
Hi folks.
I have a Flex project that use a WCF webservice. In my localhost everything is allright, but I want to upload my flex project to a web host (http://www.dorj.ir) and upload my WCF webservice to a server that has a valid IP...
After going to http://www.dorj.ir, you can see this error
Security error accessing url
Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://ip/service.svc?wsdl)
I put the crossdomain.xml file in the root of my server:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="http://www.dorj.ir" />
<allow-http-request-headers-from domain="http://www.dorj.ir" headers="SOAPAction"/>
</cross-domain-policy>
But I have the same error, yet...!
what should I do?!Have you seen this blog
"Crossdomain.xml" in ABAP Web AS Server cache -
I keep receiving security errors when trying to open a pdf.
I keep receiving a security error when trying to run my javascript program, the function previously worked, but now creates an error after I entered the addWaterMark function. I have put my whole code below for my script.
The basic function is to load a text file into an array which has the path and file location, open the document, add a watermark, save the file, close the file, then repeat for the next array position.
I am using Acrobat Standard so I am unable to debug using the console, therefore I am struggling to understand what I am doing wrong. I will point out that I am not a fluent programmer, only have a basic knowledge of programming.
Code
app.addSubMenu(
cName:"Extras",
cParent:"Edit"
app.addMenuItem(
cName:"Import File",
cParent:"Extras",
cExec:"main()"
function main()
var fileCount = 0
var listOfFiles = []
listOfFiles = importData()
amountOfFiles = listOfFiles.length
for (var i =0; i<listOfFiles.length; i++) //calculates amount of entries in the array listOfFiles
newFile = openFile(listOfFiles[i]) //Opens current file
var d = app.activeDocs; //Gets current document title name
addWater(d[0]);
app.execMenuItem("Save");
for( var x in d ) d[x].closeDoc();
function addWater(myName)
{ app.alert("watermark",0);
myName.addWatermarkFromText(
cText: "OBSOLETE",
cFont: "Arial",
nFontSize:36,
aColor: color.red,
nOpacity: 0.5
//function SaveFile saves the current file but with an addition of WM to the filename
saveFile = app.trustedFunction(function(currentDoc, currentFileName)
{ app.alert("savefile",0);
app.beginPriv();
currentDoc.saveAs(currentFileName);
app.endPriv();
//function openFile which opens the file named in the variable currentFilename
openFile = app.trustedFunction(function(currentFileName)
{app.alert("openfile" + currentFileName,0);
app.beginPriv();
app.openDoc(currentFileName);
app.endPriv();
//importData function imports the paths and filenames contained in the list.txt located on the desktop
importData = app.trustedFunction(function()
{app.alert("import",0);
app.beginPriv();
cFilePath = "/C/Users/103019944/Desktop/File_List.txt";
var stmData = util.readFileIntoStream(cFilePath);
var cData = util.stringFromStream(stmData);
var cMsg = cData;
var fileArray = cMsg.split("\r\n");
for (var i =0; i<fileArray.length; i++)
return(fileArray);
app.endPriv();I have found the error, you are quite correct I had an extra letter in the filename, I thought I'd checked this but just shows that sattention to detail is the key.
The script works perfectly now, thanks you for your help, really appreciated.
Thanks again
Ben
Maybe you are looking for
-
How to add a text area in a Content pane..?
Hi, I created a content pane with 5 buttons. One of them is a quit button, and I was able to create an "system.exit(0)" event handling for him. My problem is.. I have 4 other buttons, and I want them to show some text when I click them. How do I add
-
Is it possible to call a C-function from Java?
Hey! I have some extern variables written in C-language, can i get them into a java-file using java? How to do this otherwise? Can i use Native interface java? Or is that only the opposite way? Thanks Mikael
-
Mail keeps asking for SMTP account password
My mail has quit working and prompts me to enter my password for the account. I enter the password but the prompt comes back every 40 seconds asking for the password again. Mail does not function at all now. Problem started about a month ago. How can
-
Photoshop CS4 psd conversion to jpg
This is an inconsistent problem but one I havent been able to figure out. I resize a photo for web display, image size says 892k for the psd file after resizing. I do a save as jpg and the jpg size is 1.7 MB. at about 80%, it gets bigger? This does n
-
SWWL - being used to clear Inbox for Workflow Item in error
Hello, We are currently using SWWL for clearing Workflow Iitems from the Inbox if they have errored out directly in production. I have tried to review this in the forum and generally have come to the conculsion that SWWL should not be directly use