PDA

Click to See Complete Forum and Search --> : NetConnection screwed up



4Sheezy
08-19-2002, 04:07 PM
Started with the "recreate the sample directions" for the Text Chat sample. I got this in the output window "Level: error
Code: NetConnection.Connect.Failed" and nothing happened.

I accepted that most of this stuff is over my head and I probably made some mistake somewhere. So I took the sample file, saved it as well as the main.asc which I also cut and pasted after my initial failure.

Published and tested and got the same message. WHHYYYY????

dcullipher
08-19-2002, 05:16 PM
Okay some things to look at:

1) Are you running the trial on your local box? If so have you started the server?

2) Where is your Applications directory? Is it Program FIle/Flash Communications Server/Applications or wwwroot/Flashcom/applications? You can adjust this in the Vhost.xml file

3) Did you make a new folder in that applications directory called the same name as the app URI in you netConnection command?

These details will help us to help you.

4Sheezy
08-20-2002, 09:26 AM
Originally posted by dcullipher
Okay some things to look at:

1) Are you running the trial on your local box? If so have you started the server?

2) Where is your Applications directory? Is it Program FIle/Flash Communications Server/Applications or wwwroot/Flashcom/applications? You can adjust this in the Vhost.xml file

3) Did you make a new folder in that applications directory called the same name as the app URI in you netConnection command?

These details will help us to help you.

1) yes and yes
2) Program FIle/Flash Communications Server/Applications
3) Yes

dcullipher
08-20-2002, 12:34 PM
Okay first I would try running the NetConnection debugger so maybe you can get a little more detail on the failure.

On you frame actions put

#include "netbug.as"

Then open the netconnect debugger before you publish.

I would think that you're using rtmp:/test_app for your URI. You may also try using an absolute path of rtmp://10.2.3.4/test_app

You may want to check to see if you have a FlashCom/applications directory in your web root and try to put a folder for your app there.

psychlonex
08-21-2002, 01:33 AM
What os are you running on the server? It has to be at least win2k. It won't work with win98(tried!). Works fine with xp.

Not sure what else there is other than the stuff dcullipher mentioned. One thing would be to try going directly to the port (1935):
rtmp://localhost:1935/my_app/

And lastly - for whatever reasons, I've had troubles using:
rtmp:/test_app

but have success with:

rtmp:/test_app/

Psx

Novian
09-03-2002, 04:22 PM
Hi guys,

I thought I'd latch on to your discussion seeing as it is the closest to my problem.

I'm new to FCS. I'm working through the "testing your environment" section on the "Communication Components.pdf" file. Basically, I'm trying to set-up a simple connection to the server. I've set-up a trace and I'm certain that my path is correct. Unfortunately, I don't even get an output box let alone an error message (e.g. "NetConnection.connect.Failed") when I test the movie. What on earth am I doing wrong?

Oh yeah, I'm being hosted on mediatemple.

Any help would be greatly appreciated.

Thanks.

psychlonex
09-03-2002, 10:22 PM
Hey -
I can't seem to find where I put that swf -
but here's the simplest code I could think of to test if you're getting a connection:



main_nc = new NetConnection();
main_nc.connect("rtmp://www.mydomain.com/test_app");
main_nc.onStatus = function(list) {
trace(code.list);
}



The trace will spit out something like "net connection success", or failure, if you are able to get to the machine. The likely cause for a failure at that point is that there isn't a directory at "test_app". If nothing happens at all, then it may be that you're behind a firewall, and the outbound port is blocked??

Psx

Novian
09-04-2002, 11:52 AM
Thanx psychlonex.

The code didn't work initially but your talk of firewalls and blocked outbound ports got me on the right track.

I found a thread that talked about connection problems with http proxies. That's when I started thinking that maybe I can't connect directly to mediatemple using rtmp from my home computer. So I loaded the files to my server and bingo! it worked.

I am however confused -- does this mean that FCS will only work with apps on the same machine? I thought you can run apps on different machines as long as they pointed to the correct URI.

Thanks again.

psychlonex
09-04-2002, 12:26 PM
Hey -
Oops!
the code should be:

trace(list.code);

But you should be able to connect from your home machine. This is one of the big points to flashcom. Not sure why, unless of course you have something blocking your outbound connection.

Psx