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

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.

Related

VB webbrowser control will not load HTTPS pages

I put together a simple little program for my own personal use in VB2010 that uses an embedded webbrowser control, that allows me to click through pre-selected websites one at a time. It's something I have been using for years with no problem.
Apparently one of the websites which contains a number of pages that I view daily has switched to HTTPS format, and the webbrowser control just says The website cannot display the page. None of the other pages are secure, so I am assuming that this is what's causing the problem. The pages will come up fine on a regular web browser, like IE or Firefox; just not in my embedded web browser.
A Google search for this problem has turned up nothing.
The emulation mode is set to IE11 edge mode through the registry key, but I have also tried setting it for standard IE11, with no change.
What needs to be done to allow secure pages for this simple application?
Thanks!

Sitefinity 11: unable to access Content -> Blogs or other Dynamic Module sections

I am using sitefinity 11 Trial version. I have come across a very strange issue.
I am trying to use Content -> Blogs section, when I click that option in menu, I am redirected to "Sitefinity/adminapp/content/blogs" page. Where it keeps loading, after a while it reloads the page not URL becomes "Sitefinity/adminapp/" then after some time URL becomes "/Sitefinity/adminapp/auth/oidc/sign-in#id_token=XXXXXsomevalue" then it keeps reloading there for always.
I have tried to "switch new interface" on/off but that didn't help either.
I also have created a Dynamic Module but same problem with that too.
I searched about this issue but no help. I also came across the link but this was about customising the Admin backend screens.
Please guide me the right path.
Thanks
Very strange, I opened the sitfinity admin section in Internet Explorer. there I got the message that this browser is not supported, please switch to Classic mode. I again set the "switch new interface" to off in IE.
And I am able to access the Manage screens.
Then I cleared the browsing history on Chrome, re login into sitefinity admin section unselected the "Remember me" checkbox. And I can use the screens in chrome also.
Another thing to check is what type of authentication mode you are using. (In Administration > Settings > Advanced > Security, the AuthenticationMode drop-down). Along with IE not being supported by the new Interface (which Edge, Chrome and Firefox are), the new interface also works best with Claims Authentication, which is Sitefinity's preferred authentication mode. We found that when we switched from Forms Authentication to Claims that we had some similar functionality back even while in the new interface. (Note that in Claims Authentication you'll use a different URL for logging in: https://sitename/Sitefinity instead of https:/sitename/Sitefinity/login with Forms Authentication).

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

Getting error using Firebase popup authentication in Word add-in

I was already using Firebase for authentication for other (related) projects and would like to stick with it.
Using Firebase with a Word add-in seems challenging. On Windows you're stuck with IE11 and on Mac (crucial for me) the browser used to load a taskpane is webkit, not the default browser.
I can get authentication on Windows to work just fine if I use signInWithRedirect (Google and Facebook).
But this won't work on Mac. Using signInWithRedirect opens a new tab in the default browser, which doesn't share cookies/data with the webkit browser the add-in actually uses.
When I switch to signInWithPopup, I get:
There is no application set to open the URL about:invalid%23zClosurez.
On Windows I get a popup IE11 window, for a split second, and it contains about:invalid%23zClosurez for a URL.
I have appdomains called out in my add-in XML manifest:
<AppDomains>
<AppDomain>https://writeitwithme-a114a.firebaseapp.com</AppDomain>
<AppDomain>https://www.firebaseapp.com</AppDomain>
<AppDomain>https://www.googleapis.com</AppDomain>
<AppDomain>https://www.facebook.com</AppDomain>
</AppDomains>
Any help appreciated. Worst case I drop to using manual registration, via Firebase, for Mac, but seems unfortunate to have to give up.
Just documenting for anyone finding this later.
I couldn't figure out how to use Firebase social login when creating an add-in for Mac. Every authentication window opened in the default browser, not the webkit engine used by Word on Mac. Sticking with manual login worked.
IE11 is always finicky when using localhost. I test elsewhere, then push files live and then try IE11 and social + manual login (via popup) works just fine.
I found the following resources from Microsoft docs that made this easier for me:
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins
Basically you need to make a call to open up a dialogue box:
Office
.context
.UI
.displayDialogAsync(
'https://myDomain/myDialog.html',
{height: 30, width: 20, displayInIframe: true}
);
Then you can make your own page that does a login flow and passes a message (likely a credential of some kind) back to your plugin via the messageParent method:
Office.context.ui.messageParent(googleProfile);
From there you can do the following to sign in with the credential provided in your add-in:
firebase.auth().signInWithCredential(credential)
Also, be very careful with how you construct the URL of the dialogue box. I lost hours not knowing that the _host_Info param from the origin URL would mess stuff up (I was constructing my new URL from the origin URL). Figured it out in this github issue: https://github.com/OfficeDev/office-js/issues/378

InfoPath 2010 forms do not open in the Browser using IE8

If the user has InfoPath installed on their PC the form will default to open in InfoPath. This is not desirable. All forms should open in the browser not in InfoPath. Why? Because some users in the company my have infopath installed and some may not. It's unrealistic to uninstall InfoPath on users computers just so the forms will open in the browser.
Please review this video for more details: http://www.youtube.com/watch?v=lkIeE8MTnSc
I had the same problem. For me, pasting "?OpenIn=Browser" after the links (by default), solved the problem
You can force Sharepoint to open Infopath forms in the browser instead of the client application (Infopath).
In short:
Make sure your form is browser enabled
Make sure your form library is set to "Display as web page" under advanced settings
Make sure you configure the InfoPath Forms Services to render form templates that are browser enabled by users.
Quote from Open Infopath form in a browser when click New Item on Forms Library:
When you are creating a Infopath form make sure you tick the Enable
browser enabled features only at the time when you are creating a new
infopath form. Make sure that your form is browser enabled (Tools ->
Form Options -> Compatibility) in InfoPath. The "Design a form that
can be opened in the browser" is checked and selected. After designing
your form publish it in your Sharepoint Forms Library.
After that follow this step:
Go to the Form Library to which you published the InfoPath form
template.
Click Settings on the Form Library menu bar and choose Form
Library Settings from the drop-down menu.
On the Customize page under the General
Settings category, click Advanced settings .
On the Form Library Advanced Settings: page
under the Browser-enabled Documents category, choose Display as a Web
page .
From the Central Administration also make sure to enable this feature.
To enable this setting:
Open SharePoint Central Administration .
Click the Application Management tab.
On the Application Management page under the InfoPath Forms
Services category, click Configure InfoPath Forms Services .
On the Configure InfoPath Forms Services page under the User
Browser-enabled Form Templates category, check Render form templates
that are browser-enabled by users .
InfoPath will not open in Browser when used as a default form in a 2010 SharePoint Document set. This occurs whether force open in browser is set or not. It's a bug. I am wondering what InfoPath sees when it determines whether or not to open in the client and if there is a way to disable this writing some custom code into the form? Or perhaps once could customize the document set settings such that it would always open in the browser? from other posts on the web this problem also occurs with various other SharePoint 2010 special libraries/templates such as record center.
Moontear, The expected behavior is that ALL links (search links, task links, workflow email links) associated with the published InfoPath form open in the browser regardless of InfoPath being installed on users PCs. Keep in mind that ALL form links will open in the browser when using Chrome or FireFox.