By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,987 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,987 IT Pros & Developers. It's quick & easy.

through asp.net in C# how to check a web site is up

P: n/a
Hi,

Through ASP.Net in C# how we can check automatically that the Web Site is up.

Or generally through .Net windows application how we can check a particular
web site is up.

Please inform me,

Suresh
May 12 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Through ASP.Net in C# how we can check automatically that the Web Site is
up.
You can't get a website to check whether it's available - if it's not
available, it'll never be able to check whether it's available...
Or generally through .Net windows application how we can check a
particular
web site is up.


http://www.google.com/search?hl=en&l...ttpWebResponse
May 12 '06 #2

P: n/a
hi,

Please tell me how we can activate pinging the ip address through the
ASP.Net Page. Please help me.

Suresh
"Mark Rae" wrote:
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Through ASP.Net in C# how we can check automatically that the Web Site is
up.


You can't get a website to check whether it's available - if it's not
available, it'll never be able to check whether it's available...
Or generally through .Net windows application how we can check a
particular
web site is up.


http://www.google.com/search?hl=en&l...ttpWebResponse

May 12 '06 #3

P: n/a
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
Please tell me how we can activate pinging the ip address through the
ASP.Net Page. Please help me.


1) Please re-read my earlier reply - you CAN'T use an ASP.NET page to check
itself...if the site is down, the page won't load so it won't be able to
check itself, will it...?

2) You can't expect ping to tell you whether a website is up or not - even
if ICMP has not been disabled, all that a ping from a webserver will tell
you is that the server is on - it will not tell you if IIS is running or if
a website is up or not.

3) As I've already told you, if you want to be certain that a website is
available (i.e. responding to requests), then you have to send it a request
and interrogate its response.
Once again:
http://www.google.com/search?hl=en&l...ttpWebResponse
May 12 '06 #4

P: n/a
Hi,

Thanks.

Generally, if a remote machine which may have windows os or Linux os, that I
want to check/ ping from a remote computer that the machine is up or not. For
this is there any option through ASP.Net

Please help me once again.

====================Suresh

"Mark Rae" wrote:
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:AF**********************************@microsof t.com...
Please tell me how we can activate pinging the ip address through the
ASP.Net Page. Please help me.


1) Please re-read my earlier reply - you CAN'T use an ASP.NET page to check
itself...if the site is down, the page won't load so it won't be able to
check itself, will it...?

2) You can't expect ping to tell you whether a website is up or not - even
if ICMP has not been disabled, all that a ping from a webserver will tell
you is that the server is on - it will not tell you if IIS is running or if
a website is up or not.

3) As I've already told you, if you want to be certain that a website is
available (i.e. responding to requests), then you have to send it a request
and interrogate its response.
Once again:
http://www.google.com/search?hl=en&l...ttpWebResponse

May 12 '06 #5

P: n/a
The web classes can help you put together code to perform two necessary
actions, ping the server to see if the server is alive - then connect to
port 80 on the server via telnet into the web application and read the
response, or make a post/get request and read the response.

http://www.asp.net/Tutorials/quickstart.aspx
http://www.codeproject.com/dotnet/CSharpPing.asp
--
Regards

John Timney
Microsoft MVP

"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:5D**********************************@microsof t.com...
Hi,

Through ASP.Net in C# how we can check automatically that the Web Site is
up.

Or generally through .Net windows application how we can check a
particular
web site is up.

Please inform me,

Suresh

May 12 '06 #6

P: n/a
"John Timney ( MVP )" <ti*****@despammed.com> wrote in message
news:ud**************@TK2MSFTNGP04.phx.gbl...
ping the server to see if the server is alive


How will that help if ICMP has been disabled...?
May 12 '06 #7

P: n/a
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:84**********************************@microsof t.com...
Generally, if a remote machine which may have windows os or Linux os, that
I
want to check/ ping from a remote computer that the machine is up or not.
For
this is there any option through ASP.Net

Please help me once again.


THAT ISN'T WHAT YOU ASKED IN YOUR ORIGINAL POST!!!

I really don't know how to make this any simpler...

1) Sending a ping request to a server DOES NOT guarantee that the server is
live - lots of perfectly live servers deliberately do not respond to pings -
that doesn't mean that they are disconnected.

2) Even if you do get a response back from your ping request, that will not
tell you anything other than the fact that the server is live and
broadcasting - it will NOT tell you whether any services (e.g. IIS, SQL
Server, Exchange, FTP, POP3 etc) are running on that server.

3) If you want to know whether a website is up or not, you need to send it
an HTTP request and interrogate the HTTP response (or not) back from it.
Can you really not understand this...?
May 12 '06 #8

P: n/a
Then you can choose to ping or not, but still try and connect to the web
server anyway. If the server is offline, pretty sure a telnet connect will
time out almost immediately anyway, a lack of ping response does not
indicate an offline server..

Whatever you chose, you are going to have to use the same reponses a web
browser, or remote socket call would recieve and work it out from there

--
Regards

John Timney
Microsoft MVP

"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> wrote in message
news:eY**************@TK2MSFTNGP04.phx.gbl...
"John Timney ( MVP )" <ti*****@despammed.com> wrote in message
news:ud**************@TK2MSFTNGP04.phx.gbl...
ping the server to see if the server is alive


How will that help if ICMP has been disabled...?

May 12 '06 #9

P: n/a
"John Timney ( MVP )" <ti*****@despammed.com> wrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Then you can choose to ping or not, but still try and connect to the web
server anyway. If the server is offline, pretty sure a telnet connect
will time out almost immediately anyway, a lack of ping response does not
indicate an offline server..

Whatever you chose, you are going to have to use the same reponses a web
browser, or remote socket call would recieve and work it out from there


Yes I know - that's what I said originally...
May 13 '06 #10

P: n/a
Thanks John Timney ( MVP ).

=====================Suresh
"Mark Rae" wrote:
"John Timney ( MVP )" <ti*****@despammed.com> wrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Then you can choose to ping or not, but still try and connect to the web
server anyway. If the server is offline, pretty sure a telnet connect
will time out almost immediately anyway, a lack of ping response does not
indicate an offline server..

Whatever you chose, you are going to have to use the same reponses a web
browser, or remote socket call would recieve and work it out from there


Yes I know - that's what I said originally...

May 15 '06 #11

P: n/a
Thanks Mark Rae

==============Suresh
"Mark Rae" wrote:
"Suresh.P.R" <Su******@discussions.microsoft.com> wrote in message
news:84**********************************@microsof t.com...
Generally, if a remote machine which may have windows os or Linux os, that
I
want to check/ ping from a remote computer that the machine is up or not.
For
this is there any option through ASP.Net

Please help me once again.


THAT ISN'T WHAT YOU ASKED IN YOUR ORIGINAL POST!!!

I really don't know how to make this any simpler...

1) Sending a ping request to a server DOES NOT guarantee that the server is
live - lots of perfectly live servers deliberately do not respond to pings -
that doesn't mean that they are disconnected.

2) Even if you do get a response back from your ping request, that will not
tell you anything other than the fact that the server is live and
broadcasting - it will NOT tell you whether any services (e.g. IIS, SQL
Server, Exchange, FTP, POP3 etc) are running on that server.

3) If you want to know whether a website is up or not, you need to send it
an HTTP request and interrogate the HTTP response (or not) back from it.
Can you really not understand this...?

May 15 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.