C# WebBrowser problem with Cloudflare webiste - c#

I'm trying to navigate my WebBrowser inside my Windows Form Application to a website that uses Cloudflare.
Here is the code I'm using:
webBrowser1.Navigate("WEBSITE URL");
But when the webBrowser1 navigates to the site it get stuck on this site from Cloudflare and does not redirect to the website
Checking your browser before accessing www.WEBSITE.COM
This process is automatic. Your browser will redirect to your requested content shortly.
Is there a way to stop the webBrowser1 from getting stuck here?

Related

URL Not loading in a System.Windows.Forms.WebBrowser

I'm using a System.Windows.Forms.WebBrowser control to load a webpage. My understanding is it is just a wrapper around Internet Explorer. I'm therefore struggling to understand why the web page loads ok in a desktop browser (IE 11) but not in the browser control.
The URL has looks as so:
http://subdomain.domain.co.uk/?argumentName=argumentValue
My question is, firstly, is that a valid url (format wise)? Can you have a '?' directly after the '/' as shown? My theory is this could be getting removed behind the scenes when using a desktop browser and not happening when using the browser control. Unfortunately I cannot test that theory as the web page is behind a firewall. At the moment I know nothing else about the location of the web page other than the url.
If that is a valid url, could anyone suggest reasons it would load in IE but not in the web browswer control?
To expand on how its not working, the request times out after 30 seconds. The NavigateError event is raised (status code for me is -2146697211, but that could well be different to status code they get. I cannot find that out until I deploy a dll with some logging info).
The webpage then displays as

How do I enable javascript in webbrowser control?

I have a web application which launches a windows application using Citrix server.
Windows application has a webbrowser control.
When windows application is launched stand alone on Citrix server, web site opens in webbrowser control with no problem.
But when it is launched through my web application, the webbrowser control does not load the javascript.
It shows content blocked error. It does not fire any event and show message on web page as
"Note: Since your browser does not support javascript you must press the Continue button once to proceed
"
I tried this :
I enabled the scripting on Internet Explorer on Citrix server.
Added my application url in trusted site.
But none of the above worked for me.
Here is a nice walkthrough if you would be compelled to do something like work in IE.
https://www.whatismybrowser.com/guides/how-to-enable-javascript/internet-explorer

Prevent Web page from caching while access through mobile

I want to prevent my asp.net page from browser caching.
I apply tricks available on internet,So browser stop caching my page and every time request to server for page.
But problem is when i access my site through mobile like blackberry it cache my page and on back button press page access from its cache without ping to server.
I searched a lot but found nothing special.
One solution i found which said that mobile browser only stop caching when https request is made
Is that true or not?
Please help.
Here is a suggested method which works with mobile and desktop browser: Prevent browser caching of web pages in asp.net which works in all browsers (IE/Firefox..)

Link in winforms application which redirect to http page in default browser

Is it possible to add to the winformac application link control something which, when clicked, redirects you to the default browser with page opened for example google.com?
Launch a URL from a WinForms app

Magic with URL in asp.net - 3.5

This is my dilema:
My web site done in asp.net 3.5. I have buttons which if the user clicks should show images. The images are located at a third party and accessible via web url. So my app has to login to this third party app and they will return a url to me which i should then do a response.redirect in my website and show the user images
Think of it as have your own web page. you want to displlay images from yahoo and you need to log on to yahoo and all you have is a web address and know that it takes in username/password as either form elements or you could do yahoo.com?username=blah&pwd=doe
This would in normal sense take you to your yahoo home page and the login call also returns you a random file path which you use in your asp.net app and perform magic so that your web page is now redirected to yahoo.com/username/randomfilepath, which is basically a thumbnail page of your images.
i have tried doing this webrequest and then performing a response.redirect once i got the response back but that was a show stopper.
You might want to think about doing this inside of an IFrame. I did some facebook work which required the user to login to their facebook account. Then facebook returned to a my page at a url i specified.
What I did was create an IFrame then using the JQuery Dialog plugin showed the iframe, had that iframe postback to a FinishedLoggingIn.aspx page, then from that page I called window.top.someJavascriptToDisplayImages(someJsonWithImages);

Categories