Skip to main content
Participant
May 29, 2006
Question

please help me

  • May 29, 2006
  • 8 replies
  • 690 views
hi,

I am trying to connect my application with server but it is sowing me error of " NetConnection.Connect.Failed".
I wrote following code to do this . . . but can't connect to server.

client side script
---------------------------------------------------------------
var nc = new NetConnection();
nc.connect("rtmp://localhost/myApp/");
nc.onStatus = function(info) {
trace(info.code);
};

--------------------------------------------------------
server side script [main.asc]
--------------------------------------------------------
application.onConnect = function(newClient)
{
application.acceptConnection(newClient);
}

--------------------------------------------------------
    This topic is closed to new replies. Start a new post to keep the conversation going.

    8 replies

    Hasan Otuome
    Participating Frequently
    June 3, 2006
    I just realized you're on 1.5. Have you tried a fresh install? Backup your apps first though. Or, try installing FMS 2 (on a separate machine if you can) and see if it is because of your auto-update...
    June 7, 2006
    Thanks for the suggestions. I will not need to be trying FMS 2 right now. Sometime in the future I probably will.
    I guess the issue really is the 30 day trial. It just doesn't present itself the way the other products do.

    Oh well I have a slower alternative server to work with. So all is not lost.
    Hasan Otuome
    Participating Frequently
    June 2, 2006
    Have you also tried:

    rtmp://localhost/HM_notes/instanceone

    for your appPath? If so, what was the result? Also, I'd suggest block-commenting all the SO stuff until you resolve your main connection issue (one piece @ a time). HTH...
    June 3, 2006
    instancename = "avariablename";
    appPath = "rtmp://localhost/HM_notes/";

    function openConnection() {
    appPath = "rtmp://localhost/HM_notes/"+instancename;
    nc = new NetConnection();
    nc.onStatus = function(stat) {
    trace("nc onStatus: "+stat.code+" "+stat.description); // "nc onStatus: NetConnection.Connect.Failed"
    };
    if (!nc.isConnected) {
    iconnect = nc.connect(appPath); // It can connect to the appPath
    }
    }


    This connects for a short period. I used "rtmp://localhost/HM_notes/", "rtmp:/localhost/HM_notes/", "rtmp://HM_notes/"

    This is the messages I am getting from the admin console.
    Connect : rtmp://localhost/HM_notes/CCC
    Disconnect : rtmp://localhost/HM_notes/CCC
    Resource limit violation. Rejecting connection to : HM_notes/CCC.

    I have heard "Resource limit violation" refers to the program trial expiring.
    I was under the impression that this was a free to use developers edition. So I do not understand if this is correct or not. There was never any "You have 5 days left before the expiration." Is there another possibility?
    Hasan Otuome
    Participating Frequently
    June 1, 2006
    What are all the status messages you're getting?
    June 2, 2006
    For me I have the following inside of a connection function:

    appPath = "rtmp:/HM_notes/instanceone";

    nc = new NetConnection();
    nc.onStatus = function(stat) {
    trace("nc onStatus: "+stat.code+" "+stat.description); //traces: "nc onStatus: NetConnection.Connect.Failed "
    };
    nc.connectionMessage = function(msg) {//message from main.asc onConnect
    trace("message: "+msg);
    };
    if (!nc.isConnected) { //This is true
    iconnect = nc.connect(appPath); //this works
    notelist_so = SharedObject.getRemote("notelist", nc.uri, true); //returns true
    notes_so = SharedObject.getRemote("notes", nc.uri, true); //returns true
    notes_so.onStatus = function(stat) {
    trace("notes_so stat: "+stat.code);
    };
    notelist_so.onStatus = function(stat) {
    trace("notelist_so stat: "+stat.code);
    };
    iconnect2 = notes_so.connect(nc);
    iconnect3 = notelist_so.connect(nc);
    trace("nc: "+iconnect+" , notes_so: "+iconnect2+" , notelist_so: "+iconnect3); //traces: "nc: true , notes_so: true , notelist_so: true"
    notes_so.onSync = function(thelist) {
    getOnlineList();
    };

    It creates the instance folder but no sharedobjects folder is created. All so connect then the nc status returns the failed message.
    All of the Adobe applications also cannot remain connected. I cannot use any apps using the localhost although the apps all start and remain in the app inspector etc.

    Hasan Otuome
    Participating Frequently
    May 29, 2006
    Make sure that your server is actually running since that's when you typically get that status message. HTH...
    May 30, 2006
    I am also getting this error or similar error. It happens on my localhost where it did not previously. I have double checked that it is connected. The applications show up in the App Inspector but I cannot access any of the shared objects and the connections are not recognized when I close them.
    I am using Flashcomm server mx 1.5.
    What might cause an issue like that. I have searched many places without a lead yet.
    I moved the app to my web server. It worked ok the first few times. It is having a different problem now. I still need to test some with it. At least it allows me to disconnect.




    Gabriel