XMLSocket Error #2048

Hi Everyone,

Im looking for a solution for the Error #2048 from Flash. I have a server program developed in Java using the class xSocket and it works fine. It manage the clients from Flash. Well, once i installed the server app in my domain “” and running the client developed in Flash from my PC within Flash environment, it connects to the server with no problem. But, if i upload the flash to the domain and invoke it from the web, it doesnt work. Well, i have been seeing many web pages mentioning the policy file and i will show you how i have done it:

In the the Java App i have a event handler for incomming data where i idetify the incomming string:

if(data.equalsIgnoreCase("<policy-file-request/>")) {
                	Main.Log.append("Enviando archivo Politica Seguridad");
                    nbc.write("<cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"8090\"/></cross-domain-policy>\0");
                    return true;

In the Flash App i have the following code:

// Conexion con el Servidor.
			xmlSocket = new XMLSocket();
			//variablesAG.error.text = "Conectando";
			xmlSocket.connect("", 8090);
			// Petición de Seguridad de Flash.
			try {
			} catch (e:IOError) {
				variablesAG.error.text = "Securidad:"+e.text;

Well, the java server app receive the string policy request and it should answer with the quoted file but the Flash never receive it and in a minute the Error 2048 appear. Whats wrong?

I would appreciate your help.

Thanks in advance.