473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is "webBrowser.Navigate" a good way to continually check if a pageexists?

Hello,

I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?

If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.

Thanks,

- Alan.
Jun 27 '08 #1
8 2124
Alan wrote:
Hello,

I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?

If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.

Thanks,

- Alan.
What would the reason be for the page not to exist? It would be much
easier if the page always exists, both for the server and the clients.

--
Göran Andersson
_____
http://www.guffa.com
Jun 27 '08 #2
Alan,

I preffer for this kind of stuff the HTTP classes

http://www.vb-tips.com/MSHTML.aspx

Cor
"Alan" <br****@gmail.comschreef in bericht
news:66**********************************@c58g2000 hsc.googlegroups.com...
Hello,

I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?

If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.

Thanks,

- Alan.
Jun 27 '08 #3
I'm rather worried with server side as you'll receive thousands of request
each minute to check for this page...

AFAIK using System.Net.Socket should allow to use (rather than fake) instant
messaging to notify the client side application that the intranet page is
available and should be displayed.

--
Patrice

"Alan" <br****@gmail.coma écrit dans le message de groupe de discussion :
66**********************************...oglegroups.com...
Hello,

I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?

If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.

Thanks,

- Alan.

Jun 27 '08 #4
Thanks to all.

Göran, if the page exists, that would mean there is a message to
display. No page, no message.

Cor, I'll check out the link.

Patrice, I'll check out sockets too. But I want to keep it really
simple and sockets would mean establishing a permanent connection from
each client - plus coding a custom server component too?

I'm thinking of having each client check once a minute so the average
should be 1,000 checks a minute. I have a powerful web server which is
used very little. I was thinking for looking for the presence of a
text file in a network share instead, but I think a web server would
handle the load better.
On Jun 6, 7:30*pm, "Patrice" <http://www.chez.com/scribe/wrote:
I'm rather worried with server side as you'll receive thousands of request
each minute to check for this page...

AFAIK using System.Net.Socket should allow to use (rather than fake) instant
messaging to notify the client side application that the intranet page is
available and should be displayed.

--
Patrice

"Alan" <bru...@gmail.coma écrit dans le message de groupe de discussion :
6651761b-0668-436f-bcf6-5eb8708ad...@c58g2000hsc.googlegroups.com...
Hello,
I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?
If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.
Thanks,
- Alan.
Jun 27 '08 #5
Alan wrote:
Göran, if the page exists, that would mean there is a message to
display. No page, no message.
Yes, but why does the page have to be missing just because there is no
message? The page could just be an empty page when there is no message.

The server always returns a page for every request; if the requested
page doesn't exist, the server returns an error page instead. The fact
that there is no message doesn't mean that there is something wrong, so
it doesn't feel right to create an error condition for that.

Also, to handle a missing page, the client has to distinguish between
different error pages, to determine if it's just a missing message that
is causing an error page to be returned, or if it's a real error.
I'm thinking of having each client check once a minute so the average
should be 1,000 checks a minute. I have a powerful web server which is
used very little.
I suggest that you add a random factor to the delay, so that you don't
risk to get hundreds of requests at the same time every minute.
I was thinking for looking for the presence of a
text file in a network share instead, but I think a web server would
handle the load better.
Yes, you would probably get problems with a network share when the
server is trying to write to the file at the same time as several users
are trying to read it.
--
Göran Andersson
_____
http://www.guffa.com
Jun 27 '08 #6
"Alan" <br****@gmail.comschrieb:
I need to write a systemtray program to check every minute if a
certain intranet page exists. Would "webBrowser.Navigate" and catching
exceptions to it be a good choice in terms of load on the PC?

If the page exists, the program should load and display it. The
program would run on a couple of thousand PCs and the idea is to have
a very basic, one-to-many instant message.
I suggest to take a look at 'WebClient' and 'HttpWebRequest'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Jun 27 '08 #7
I see your point.

My original idea was that if there was simply no page, then there was
nothing to do. If there's always a page, then the client has to
download it, read its contents and decide whether to display it or
not.

Your idea is probably better because I also need a way to decide if
the page has been displayed before. I can do that if I'm already
parsing the contents.

And thanks for the random factor, that's a very good idea indeed.
On Jun 6, 10:14 pm, Göran Andersson <gu...@guffa.comwrote:
Alan wrote:
Göran, if the page exists, that would mean there is a message to
display. No page, no message.

Yes, but why does the page have to be missing just because there is no
message? The page could just be an empty page when there is no message.

The server always returns a page for every request; if the requested
page doesn't exist, the server returns an error page instead. The fact
that there is no message doesn't mean that there is something wrong, so
it doesn't feel right to create an error condition for that.

Also, to handle a missing page, the client has to distinguish between
different error pages, to determine if it's just a missing message that
is causing an error page to be returned, or if it's a real error.
I'm thinking of having each client check once a minute so the average
should be 1,000 checks a minute. I have a powerful web server which is
used very little.

I suggest that you add a random factor to the delay, so that you don't
risk to get hundreds of requests at the same time every minute.
I was thinking for looking for the presence of a
text file in a network share instead, but I think a web server would
handle the load better.

Yes, you would probably get problems with a network share when the
server is trying to write to the file at the same time as several users
are trying to read it.

--
Göran Andersson
_____http://www.guffa.com
Jun 27 '08 #8
Alan wrote:
I see your point.

My original idea was that if there was simply no page, then there was
nothing to do. If there's always a page, then the client has to
download it, read its contents and decide whether to display it or
not.

Your idea is probably better because I also need a way to decide if
the page has been displayed before. I can do that if I'm already
parsing the contents.

And thanks for the random factor, that's a very good idea indeed.

If you have the resources for it, you could do this very nicely with a web
service. The advantage is that you can setup a web service call that returns a
few simple values, such as a Boolean indicating MessageAvailable, and a DateTime
indicating LatestMessage. Your client program can pass values into the web
service, then check the return values directly to see if it needs to do
something.

The service could also return a value indicating how long to wait before asking
again, so that it can control the distribution of requests over time. Instead of
the client storing values, you could even have the server keep track of which
users have seen what, if there is a data store available. The logged on user can
be identified by the web service request, and their status could be maintained
on the server.

Lots of possibilities...
Jun 27 '08 #9

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

Similar topics

0
by: Raymond H. | last post by:
Hello, in my vb projet, I put a WebBrowser and when I view the contents of my hard disk with 'WebBrowser1.Navigate "C:\"' I view my directory in the right side only and in the left side it is'nt...
0
by: katheo via AccessMonster.com | last post by:
Hello, I am using a data access page on a local secure server. As the user changes information, the data updates automatically in the database. But when the user goes to close the page, they get a...
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
1
by: Robin Dindayal | last post by:
Does anyone know how I can print a fully rendered .aspx to the server's printer? I know that, if I wanted to print to the client's printer it would be easy (ie. use javascript's window.print()). ...
0
by: StepHenHairNet | last post by:
I have a problem with MS Graph which I wonder if anyone can help me with. I have built an application in VB.Net, using a WebBrowser control to act as an pseudo OLE container for the Graph Object,...
2
by: ari | last post by:
I have a vb.net program that uses the web browser for display purposes. I have implemented a type of "tooltip" pop up window that works as follows: in the html I have defined: &lt;SPAN id="1"...
0
by: keikoo | last post by:
Hi, I need some help with this control. There's a windows form with a axwebbrowser control inside, so users can navigate to a page and it's necessary to keep the session, because, users will...
0
by: kimiraikkonen | last post by:
Hi, I want to use my own context menu strip to navigate a URL within a "new window", so i disabled IE's (webbrowser control's) native context menu, and decided to use my own. However i added a...
3
by: Sarah | last post by:
Hi - Please be gentle. I am quite new to visual basic, but I have been going through tutorials and reading up. I found a code snippet on the internet that I wanted to see if I could re-purpose...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.