473,586 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Internet Accessible?

Hi all
How can I find that user is connected to internet or not?

thanks in advance
Sep 23 '06 #1
4 2180
Hello perspolis,

Google first
http://groups.google.com/groups/sear...check+internet, as well as
http://www.codeguru.com/Cpp/I-N/inte...icle.php/c3437
sample

pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 23 '06 #2
Is there an equivalent to InternetCheckCo nnection in .Net? If not, why not
interop it?

Here's another alternative:

using System.Net;

HttpWebRequest request =
(HttpWebRequest )WebRequest.Cre ate(@"http://www.microsoft.c om");
An exception indicates that the site isn't reachable thus probably there is
no internet connection (ms site could be down as well, but that is not as
probable).
--
Regards, Peter

"Michael Nemtsev" <ne*****@msn.co mskrev i meddelandet
news:17******** *************** ****@msnews.mic rosoft.com...
Hello perspolis,

Google first
http://groups.google.com/groups/sear...check+internet, as well as
http://www.codeguru.com/Cpp/I-N/inte...icle.php/c3437
sample
pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche



Sep 23 '06 #3
This is the check for network connectivity (in .NET 2.0):

System.Net.Netw orkInformation. NetworkInterfac e.GetIsNetworkA vailable();

This will tell you only if you are connected to something (network, dialup,
wireless etc), not whether the internet is contactable. The best bet is to
try and do what you want to do and handle any exceptions, or try and open
something like google for microsoft to check for connectivity.

HTH

Ciaran O'Donnell

"Peter Thornqvist" wrote:
Is there an equivalent to InternetCheckCo nnection in .Net? If not, why not
interop it?

Here's another alternative:

using System.Net;

HttpWebRequest request =
(HttpWebRequest )WebRequest.Cre ate(@"http://www.microsoft.c om");
An exception indicates that the site isn't reachable thus probably there is
no internet connection (ms site could be down as well, but that is not as
probable).
--
Regards, Peter

"Michael Nemtsev" <ne*****@msn.co mskrev i meddelandet
news:17******** *************** ****@msnews.mic rosoft.com...
Hello perspolis,

Google first
http://groups.google.com/groups/sear...check+internet, as well as
http://www.codeguru.com/Cpp/I-N/inte...icle.php/c3437
sample
pHi all
pHow can I find that user is connected to internet or not?
pthanks in advance
p---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche



Sep 25 '06 #4
You can also handle events with network availability at
System.Net.Netw orkInformation. NetworkChange.N etworkAvailabil ityChanged
and you can ping webserver to check for connectivity too.
System.Net.Netw orkInformation. Ping

HTH

Ciaran O'Donnell
"perspolis" wrote:
Hi all
How can I find that user is connected to internet or not?

thanks in advance
Sep 25 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3279
by: Jozef | last post by:
Hello, Is there a way to test that an internet connection exists and that you are able to see the webserver before performing any connections? The reason being, when I try to connect to an SQL database it takes sooo long to time out if the connection isn't available. If a user is on a dial up connection, I'd like to be able to determine...
1
1434
by: Linno Hak | last post by:
Hi all, I've written an ASP.NET application that is running fine on the Intranet. I'd like to make this application accessible via the Internet. Can anyone please recommend any good book or guide on how I can set up/configure my ASP.Net application to be accessed on the Internet?. Thanks LH
12
3060
by: Paul Tillotson | last post by:
At my company we are looking at deploying clients for our client/server app outside our firewall, which will then require our postgres box to be internet-accessible. Does anyone out there have experience with this or recommended best practices? We have been looking at either (a) tunnelling everything over ssh, or (b) just making sure that...
5
1254
by: asdf | last post by:
Hi, Currently, I have one database for Intranet clients on the server behind the firewall. But I was asked to allow the extranet users to access the same data. From the security perspective what is the best way to make that data accessible. Should we have two databases one for Intranet and one for Extranet? In that case the second one...
7
1966
by: Visitor No 3 | last post by:
My local Crinkles group(U3A), of which I am one, want me to develop a noddy database and web site for their members. Some are computer literate, others not so. I thought an Access 2000 .mdb on a server from the local council with a web page in Active Server Pages(ASP) and using ADO would do the trick, then one of them could update it at home...
1
1321
by: staeri | last post by:
I have a web application developed in ASP.NET 2.0 with SQL Server 2005. The application is on a hosted server accessible from Internet. I have a potential customer who insists on having the application hosted on their own web server and SQL Server and I'm very worried about someone stealing the application or database. I'm not so worried...
0
1868
by: doron.grinstein | last post by:
A lot of architects tackle the issue of exposing internal web services and web applications to the Internet. How many times do you see a requirement such as "the application should be accessible to users behind the firewall (on the intranet) but also to users on the Internet"? Traditionally, architects had two choices - beg the network...
2
1962
by: =?Utf-8?B?Sm9zZXBo?= | last post by:
I am building an ASP.Net 2.0 application that will be accessible through both internet and intranet. The application will use two different types of security methods, depending on whether the application is being accessed through internet or intranet. I am trying to figure out how to write the code necessary to have the application make the...
4
3723
by: Umenzi | last post by:
I'm looking for different methods of disabling all internet access that work on XP and Vista. It would need to be reversible. Preferably, these methods would be accessible through a python program (not the best for the task, but it's all I know). Some things I've considered: Modifying the registry in...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.