How to set the nomerge option in .NET WebBrowser control? - webbrowser-control

I launch IE with the "nomerge" option while testing our web applications, when I need to login as two different users at the same time. I would like to know if the same option is available with the .NET web browser control? (or for that matter with other web browser controls such as geckofx or webkitsharp) I want to launch two web browser controls inside the same winforms test application and be able to login as two different users.

Related

Access application-saved data from a web browser

We have a desktop application for which the user enters some registration details (e.g. support code), and can then use the application.
We would like to be able to automatically fill our support website ticket form with this information, even if the desktop application is not running.
So far we've considered:
InternetSetCookie - but it only works for Windows+IE
use Selenium to create cookies for all major browsers (seems an overkill, and required us to distribute Selenium along with our app)
have a JS service always run in the background
Are there better alternatives?

can I use build in browser control(In visual studio item tools) for Auth 2?

You know there is a web browser control in visual basic controls.
When we are using Auth2 for get into Google Apps(Gdrive,GPlay...) it opens a webpage in OS default browser(Chrome , Fire fox...) to get permissions. How can I make it to request from a web browser control on the form without opening other browsers?
The Google .Net client library is designed to open the users default browser for authentication.
The client library does not have the functionality to give you the url you would need to open it in a web browser control.
Sorry this is not possible

VB.NET Web Browser Control

When I use the Web Browser control with VB.NET and navigated to a site it said 'outdated Web Browser'. When I use Internet Explorer the site loads fine. I thought the Web Browser control used the latest version of Internet Explorer installed on the machine? I really need this site to load with the Web Browser control so I can manipulate it and use API functions. Is there some advanced Web Browser control I can use that will work better?
By default webbrowser control uses IE 7 if the version of the IE in that machine is IE7 or above. Please check your site in IE7 browser.

Testing Facebook app on VB.NET WebBrowser - IFrame Access Deined - Cross-Domain Scripting

I have a facebook iframe app I'm trying to test using a WebBrowser Control on a form in VB.NET 2010. Whenever I try to access the WebBrowser.Document.Window.Frames frame object on a document where my app is showing in the broswer, I get an Access Denined exception. Reading around on the web, I see people saying that this is to keep scripts in a document from accessing content in iframes that are pulling content from another domain, as per 'http://msdn.microsoft.com/en-us/library/ms533028.aspx', for security reasons.
While I totally understand why this is done for the general public, how can I disable it on my machine so that I can run these tests? I can't properly test my app without doing it in the facebook iframe and using the WebBrowser control is the only way I know to do this test programmatically.
Any ideas? I'm on windows server 2003 and ie8, .net4.0, if that helps. I own the domain where the app is, and its in AS.NET MVC2, so if there's anything I can do to the web code to enable this??? I also removed the Internet Explorer ENhanced Security COnfiguaration component, but that didn't help.
Thanks,
Philip
Have you tried changing your Internet Explorer settings to enable cross domain scripting?
I believe the VB.Net Web Browser control inherits settings from the local copy of IE.
Try this:
From Internet Explorer, choose Internet Options from the Tools menu.
On the Security tab of the Internet Options dialog box, select the Local Intranet Web Content Zone and then click Custom Level.
Locate the Miscellaneous/Access Data Sources Across Domains setting, and then select Enable, as shown in Figure 2.
Click OK, and then click Yes to the warning dialog box that appears.
Click OK to close the Internet Options dialog box.
Also try adding the Facebook https Url into your trusted sites.
As a last resort disable Native XMLHttp in IE and attempt to revert back to an older version of the XMLHttp object.

Hosting multiple WebBrowser controls in one window causes sessions to "cross": any solutions?

I have a Windows forms application written in VB.NET where I host multiple WebBrowser controls in the same window. The problem I'm having is that the session for each WebBrowser control seem to get "crossed" when making asynchronous requests, such as when loading images. For instance, I have WebBrowser1 that loads an HTML document and WebBrowser2 that loads another HTML document. WebBrowser1 hosts an image that's served up by an ASHX page and is dependent on the browser session. The problem is that when the request is made for the image in WebBrowser1, the server actually receives the session ID from WebBrowser2. Is there a way to force each WebBrowser control to have a unique session?
The WebBrowser control is essentially just an embedded version of IE. If you launch the regular IE, log into a website, then launch a second copy of IE and visit the website you'll find yourself already logged in with the second instance because IE shares cookies across instances. The same is true of the WebBrowser control. If fact, if you log into a website with IE and then have the WebBrowser control go there you'll find that its been logged in, too, since the cookies are all shared.
So basically, AFAIK, you can't do what you want.