[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

WAN + LAN remoting autodial

Matthew Murfin

7/12/2004 6:20:00 PM

I have an C# .NET remoting app/server that is sometimes inside the domain on LAN and sometimes outside on WAN. 1) I would like to
easily detect the IP connection status (See footer notes).
2) I think I would like to be able to pop up the standard Internet Auto-Connect dialog IFF no connection is detected (i.e. remote
connect times out, or actual IP connection status check). It seems that this will be unmanaged code as I haven't found any
framework help in my searching, just the various RAS, WSOCK, etc apis.

I was half hoping that just setting up internet networking to auto-dial when necc would pop up the connect dialog when I tried to
open up my TCPIP channel and there was not a detected network connection (Yes... I'm gullable and a bit lazy).

Q: Has anyone done something similar or have another approach or ideas on auto detect and connect LAN/WAN?

--
Thank you,

Matt MurfinSimmons
Selectron Technologies Inc
mmurfinsimmons@stigov_RMVTHIS_.com

/***********************************/
Some notes:
/***********************************/
using System.Runtime.InteropServices;

[DllImport("sensapi.dll" ) ]
public static extern bool IsNetworkAlive( out int flags );
...
int flags;
if( IsNetworkAlive( out flags ) )
Console.WriteLine( "Network connected, flags:{0}", flags );
else
Console.WriteLine( "Network NOT connected!" );