Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to check website response like as website is responding properly like it giving some error
like 404 or 505 or its "Internet Explorer not able to find web page" Please give some different or easy answer i already searched in google..

Iam using Below solution but while using "for loop" for more then one link at a time its not working can any one please help me.


C#
webBrowser1.Url = new Uri( "http://SomeRandomUrl");
            ((SHDocVw.WebBrowser)webBrowser1.ActiveXInstance).NavigateError += new SHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(Form1_NavigateError);
.
.
.
void Form1_NavigateError(object pDisp, ref object URL, ref object Frame, ref object StatusCode, ref bool Cancel)
        {
            int currentStatusCode = (int)StatusCode;
Posted
Updated 24-Feb-14 18:01pm
v3
Comments
David_Wimbley 23-Feb-14 2:33am    
Can you give the URL you are using? Is it an external one or an internal to your company?
Ashwani Gusain 24-Feb-14 2:02am    
David any url you can take like "google.com", but my questions is if we use loop like for or while as i have more then one link in this condition its not working.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900