Re: GPRS socket connect always succeeds

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On 19 Noi, 20:12, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
To give a more-sure indication, then, does Internet Explorer think that it's
been successful when you try to connect it to a port that isn't there?
You'd have to specify an IP address, rather than a Web site name, I think,
to test this (you might do something likehttp://172.16.0.1/hello.html). If
this fails immediately, I think there's a bug in your code. If it waits for
a substantial period of time, then generates a time-out error, that's
consistent with what your code is seeing. If something else happen, that
might help us identify what's going on.

Who is your carrier?

Paul T.
Paul,
The device is headless, so there's no IE.
I've tested a simple TCP connect using .NET 2 SP2 - please correct my
code if there's something wrong with it (I'm still new with .NET):
TcpClient tcp=new TcpClient();
try
{
tcp.Connect("123.123.123.123", 50002); //any IP or port, actually
Debug.WriteLine("succeeded");
}
catch
{
Debug.WriteLine("failed"); //never get here, unless there's no GPRS
connection (dial-up is disconnected)
}

I've tried with 2 carriers (Orange and Vodafone) actually - same
result :(.
A while ago I found a post for someone that had the same problem - I
can't seem to find it now. Nobody replied.

Mircea
.



Relevant Pages