Redirect from Dialog API in Outlook Add-in - outlook-addin

When you open a dialog using the office.js Dialog API from your add-in, apparently the page opened has to be from your add-in's domain. It can however immediately redirect to a page in another domain.
How would you recommend carrying out such a redirection?
Is anyone redirecting to another domain from such a dialog? If so how are you doing it and what have been your results?
Thanks.

How you do it depends on the framework you are using. This ASP.NET MVC sample does it in a controller with a call to the ASP.NET Redirect method.
This single page add-in sample uses the JavaScript window.location.replace property.

Related

How do I hide an Outlook JS Add-In for OWA, but not for other applications (desktop outlook, Office365)?

Is there an option in the manifest.xml to stop the Add-In from appearing in the OWA app ?
It appears that FormSettings is a mandatory field, and at least one Form is required.
There are some functional parity issues with OWA (e.g. UI-less action, TaskPane for EditItems) that push us to forego having it there.
Thanks!
Currently the feature : "showing add-in on specific platform"
, you requested, is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process.
There are no options currently. You may post your feedback or request on the UserVoice page.

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

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.

System.Windows.Forms.WebBrowser login dialog doesn't appear

When I navigate to an intranet site requiring windows authentication, the WinForms WebBrowser control isn't displaying a login dialog. But it will display (after refreshing the page) if I first open Internet Explorer and view the same page.
Also, if I make the URL refer to my local IIS instance, the login dialog will appear.
Any ideas? Thanks!
You can send credentials via IAuthenticate. You can either extend the winform webbrowser site or write your own webbrowser wrapper.

SharePoint 2010 FBA with custom form - 403 error

I have a SharePoint 2010 site that is configured for Forms Based Auth using custom role, membership and profile providers. This works perfectly using the OOTB SharePoint 2010 FBA form (ie. under /_forms in the web app virtual directory).
My problem is with a custom login form that is located in a separate folder, /Landing/Login/default.aspx. I've configured the web app to point to this form (contains an unmodified ASP.NET login control), which is rendered when the user hits the root URL. The problem comes when they submit their credentials and the form posts back for the redirection to /_layouts/Authenticate.aspx. It stops cold with a 403.
If I revert back to the OOTB FBA form (using the same providers) everything works fine. Any suggestions on what could be going wrong?
So, I discovered the solution after examining the OOTB FBA login form that inherits from Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage and taking a look at the code with Reflector.
I modified my custom form to inherit from the same object and replicated the content placeholders (some I put into a panel control with the visibility set to false) from the OOTB Form.
Presto. My custom form now authenticates flawlessly. On reflection, this seems an obvious thing to do, just isn't documented anywhere.
I just went through this process myself, and wrote up the steps I had to take to get FBA working with a custom login form. Hopefully it'll help the next poor soul that is trying to get this to work.
http://mikevallotton.wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-2/
If you want to use ready-made solutions for the management of FBA users, you should take a look here:
http://www.devit.eu/products/121-fba-manager-sp2010-forms-based-authentication.aspx