I have a problem with a webBrowser.
I follow the instruction here C# webbrowser Ajax call to customize the webBrowser but I have a problem with security, I think.
When my application starts, I have this message in my webbrowser:
To help protect your security, Internet Explorer has restricted this
file from showing active content that could access your computer.
Click here for options
How can I force the webBrowser to accept my script?
Related
I created something in C# that just uses the C# default WEBBROWSER CONTROL on a FORM CONTROL. My application logs in on the website using the WEBBROWSER CONTROL located on NEW Form2() then close(). Afterward it will browse the website using another WEBBROWSER CONTROL on NEW Form3(). This applications works on some windows and some not.
The problem is when I open Form3() , it forces me back to login page which means the session or cookie is not shared or saved. I need it to use old session and cookies after I logged in using another WEBBROWSER CONTROL on a past Form()
I have solved this before by following a page I read online but I no longer has access to it and didn't remember it by heart, big regret.
However the trick was related to something on the Server Manager > Internet Explorer or Registry I don't quite remember since I only did it once and it works.
Anyone knows how to solve this please help, much appreciation on any information.
I created a program in c# with webbrowser control that opens a web site and the user will be automatically logged in. That works. However the user should also browse through different web site sections and that's where I get a problem. There is a button on one page "print preview" and what it does in "normal browser" (IE or Mozilla) it opens a new tab and shows the contents. In my program it opens Internet Explorer (it is the default browser) and shows me login page again. Can anyone explain how to open a new tab in my webbrowser control (or new window) and pass login data.
Thank you.
It can't be done the way you are trying to do it. There is no concept of tabs in the web browser control. You can verify this by loading up an html page that makes calls to window.open() in javascript. If that call is made it will just launch an instance of IE that navigates to that particular URL.
Your best bet is to have multiple web browser controls and pass data between them. Either that or use HttpWebRequest.
Although, depending on what you are trying to do you may want to automate IE instead.
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
Is there a way for a standard C# desktop app to detect the URL that the browser is going to navigate to, and possibly prevent it from doing that? An example would be all those download managers that pop up when I click a link in the browser and prevent browser's default action from occurring.
you can not access to internet browsers from winform projects but
you can access if you have a plug-in app. for browsers.
Develop a plug-in app. and communicate with your winform app. like internet download manager app.
here is expamle for IE add-ons
IE add-on express
for chrome
Google dev guide
hopefully helps it.
I want to get the URL from all open tabs. I have searched on Google but could not find any luck. I want to read and log the URL from all open tab from Chrome And IE.
I am using C# windows form application.
Thanks in Advance..
Umang
I understand what you need to do but I would be surprised if IE and Chrome would expose the tabs and the urls in a simple and similar way to external applications, I think the way to go is to build a Chrome extension and an IE plugin or Addin to get those information while running within the browser scope, then you can send this info to an external application or to a web service etc... you will find a way to get the info out once you have got this url list inside your own code running with the browser.
see here for some starting point / ideas
Chrome extensions:
http://code.google.com/chrome/extensions/index.html
IE development:
http://msdn.microsoft.com/en-us/library/bb250436(VS.85).aspx