I can not link the client to the server.

server started.
create a new directory "applications / app";
create it in the file "main.asc" with a simple code:

application.onConnect = function (clientObj)
{
application.acceptConnection(clientObj);
}

swf in writing to:

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/app");

nc.onStatus = function(info){
trace("Event: " + info.code + "\n"); // output: Event:
NetConnection.Connect.Failed
}

What could be the problem.
thanks