PC Review


Reply
 
 
yqyq22
Guest
Posts: n/a
 
      24th May 2006
Hi all,
I would like code a program that check if my iis is up and running, I
think a probe is a good way, but I dont have idea how to implement this

probe and where begin.
moreover I would like that this Probe must be always active.
Is there a way to do this?
Please, could you give me some advice? class/methods
thanks a lot in advance!!!

 
Reply With Quote
 
 
 
 
Galcho[MCSD.NET]
Guest
Posts: n/a
 
      24th May 2006
see ths method. all you have to do is to put URL to machine where IIS
reside

public static bool IsOnLine()
{
bool flag1;
WebResponse response1;
WebRequest request1;
try
{
Uri uri1 = new Uri(@"http://www.contoso.com");
request1 = WebRequest.Create(uri1);
response1 = request1.GetResponse();
response1.Close();
request1 = null;
flag1 = true;
}
catch (Exception exception2)
{
ProjectData.SetProjectError(exception2);
Exception exception1 = exception2;
response1 = null;
request1 = null;
flag1 = false;
ProjectData.ClearProjectError();
}
return true;
}

Hope it helps


Galin Iliev[MCSD.NET]
www.galcho.com

 
Reply With Quote
 
DaanishRumani
Guest
Posts: n/a
 
      24th May 2006
I guess the last return statement should be "return flag1".

Am I right GALCHO?

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      24th May 2006
You may be in luck. I wrote this service some time ago, and it has even been
improved by some users:

http://www.eggheadcafe.com/articles/20040516.asp

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"yqyq22" wrote:

> Hi all,
> I would like code a program that check if my iis is up and running, I
> think a probe is a good way, but I dont have idea how to implement this
>
> probe and where begin.
> moreover I would like that this Probe must be always active.
> Is there a way to do this?
> Please, could you give me some advice? class/methods
> thanks a lot in advance!!!
>
>

 
Reply With Quote
 
Galcho[MCSD.NET]
Guest
Posts: n/a
 
      24th May 2006
yes, you're right.

sorry it is my mistake as this is from test application

regards
Galin Iliev[MCSD.NET]
www.galcho.com

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      24th May 2006
yqyq22,

Are you trying to see if IIS is up and running, or are you trying to see
if you can connect? If you are trying to see if you can connect from a
particular machine, then that is the only way you can do it.

However, if you want to see if IIS is up (say, from an internal app),
you are better off getting the service controller on the machine it is on
and checking that. It's probably cleaner as well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"yqyq22" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
> I would like code a program that check if my iis is up and running, I
> think a probe is a good way, but I dont have idea how to implement this
>
> probe and where begin.
> moreover I would like that this Probe must be always active.
> Is there a way to do this?
> Please, could you give me some advice? class/methods
> thanks a lot in advance!!!
>



 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      24th May 2006
It should be noted that this error isn't completely correct.

When getting the response, a WebRequest could be thrown as a result of a
return code from the server. So, in other words, you could very well get a
response, and still throw.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Galcho[MCSD.NET]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> yes, you're right.
>
> sorry it is my mistake as this is from test application
>
> regards
> Galin Iliev[MCSD.NET]
> www.galcho.com
>



 
Reply With Quote
 
Galcho[MCSD.NET]
Guest
Posts: n/a
 
      24th May 2006
you're right... for instance you will get error if IIS returns Error
404. this code is in case you need specific resourse and you just
check if IIS is exposing it.

depends of course if application needs resource or just to check if IIS
is up. both task could be made easily in one as having permanent,
static, small html page that will be use for check

I think it is much clearer now. Thank you

Regards
Galin Iliev[MCSD.NET]

 
Reply With Quote
 
yqyq22
Guest
Posts: n/a
 
      24th May 2006
ehm ehm, thanks a lot, sincerely I should check apache and soap
protocol (5 istance with different port, example http://myserver/...:90
, http://myserver/...:91 ) all running on windows2003 ( custom
application buied :-( ), hovewer I would like check the connection on
all 5 soap istances.
All 5 instances running as services (5 services, 1 parent and 4
children)
I know that is difficult because i don't know in details soap protocol
and apache, i think that servicecontroller is the better way maybe..
thanks again.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
probe RENE Microsoft Access 0 18th Dec 2008 03:32 PM
probe Mathias Kunze Microsoft Access 0 23rd Nov 2008 06:43 PM
Probe chaho.plotz Microsoft Access 1 6th Aug 2008 05:18 PM
PC Probe marko Asus Motherboards 11 27th May 2005 02:35 PM
Probe Linea Recta Asus Motherboards 4 7th Mar 2004 02:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:46 AM.