Restarting Activesync from the device

G

Guest

Hi!
Our application connects to a sql server on the LAN via the host computer
using activesync. We use TcpClient to get a connection to the server.Once in
a while, with no consistent pattern, we get socket exception with a message
"Connection refused. No connection could be made because the target computer
actively refused it." The only way to resolve this is to undock and dock the
device again. This seems to work.
Is there a way that device can be disconnected and then reconnected to the
host computer through activesync? Are there any API calls that might do that?
If anyone has any input on this, please share your suggestions.

Thank you for your time.
Regards,
Raj
 
D

Darren Shaffer

Raj,

Try the just-released Activesync 3.8 and see if things don't improve for
you.
Having to un/redock a device to re-establish TCP transport to the host
computer
has been an issue with Activesync for a long time, but I've noticed an
improvement
with AS3.8.

Darren Shaffer
Principal Architect
Connected Innovation
 
G

Guest

Thank you for responding Darren.
I installed ActiveSync 3.8 and there seems to be some improvement but after
the application is used for a while (no consistent pattern), the
socketexception shows up again. Currently, we just catch the exception, log
the message and let the application go on.
From what I read and understood, this might be happening if the SQL Server
fails to acknowledge the connection request or the specified port is under
some security mechanism. I could be wrong but please correct me if that is so.
What we would like to do is to try at least 'n' number of times to get a
connection and if that still throws the socketexception, then inform the user
in an unintrusive way to undock/dock the device or do this
programmatically(using C#).
I tried to find out if anyone has come across this type of behavior. This
is, as you mentioned too, common and I was unable to find any programmatic
solution. Is there any way to do this?

Thanks and regards,
Raj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top