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!!! 8 1892
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
I guess the last return statement should be "return flag1".
Am I right GALCHO?
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!!!
yes, you're right.
sorry it is my mistake as this is from test application
regards
Galin Iliev[MCSD.NET] www.galcho.com
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]
- mv*@spam.guard.caspershouse.com
"yqyq22" <yq****@hotmail.com> wrote in message
news:11**********************@38g2000cwa.googlegro ups.com... 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!!!
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]
- mv*@spam.guard.caspershouse.com
"Galcho[MCSD.NET]" <ga****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com... yes, you're right.
sorry it is my mistake as this is from test application
regards Galin Iliev[MCSD.NET] www.galcho.com
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]
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Larry Melia |
last post by:
I've been working with Oracle 9i for about 8 months on windows XP (the same
problem occurs with WIN2000). However, I noticed that the latest release has
some software that "hits the disk" about...
|
by: viraboy |
last post by:
Hello,
Trying to create new DMS TS, when run command to create receive error:
2004-04-20-16.23.16.444283 Instance:clldb201 Node:000
PID:8052(db2agent (CLLDB00)) ...
|
by: WantedToBeDBA |
last post by:
Hi Friends,
I am running a stored procedure in Windows 2000 box (version 8.1.0)
and i am getting following error in db2diag.log repeatly. The scenerio
is as follows. I am inserting 55000...
|
by: baubab |
last post by:
I am running SUN server and DB2 version 8.1
During the execution an application Tivoli (ITIM) the following error
has been taken place.
2005-10-26-17.43.10.884357 Instance:db2itim Node:000...
|
by: news.cyberlink.ch |
last post by:
Hi,
We have a DB2 version 7 fixpack 14 installed on Windows 200 at a customer
site that is crashing at regular intervals.Everything was working fine for
over many years, now since about one...
| |
by: tomhanks |
last post by:
Please help my diaglevel is at 3 still i get these messages. My platform is Aix 5.2
2007-04-25-01.08.04.209068-300 I12660C351 LEVEL: Severe
PID : 38574 TID : 1 ...
|
by: Lars Eighner |
last post by:
I have been getting this probe about every 90 minutes whenever I am
online. Since I have dynamic IPs with my provider, this would seem
to be a pretty determined effort. Does anyone have any idea...
|
by: rmarcosa |
last post by:
Hi,
I have a DB2 ESE 8.2 AIX 64bits FP15 server, and when a job is
launched from scheduler in the task center, I watch messages into
db2diag.log like this:
2008-05-13-10.03.46.853638+120...
|
by: eddy82 |
last post by:
Hi All,
I have this db2start in my db2diag.log everyday around the same time. But no db2stop in the db2diag.log or in the db2.nfy.
I already check and no corruption or cronjob running during...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
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...
|
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...
|
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,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |