open office doc inside windows metro app

5
Open office doc inside Windows Metro App BY:ASHISH AGRAWAL

Upload: ashish-agrawal

Post on 29-Jun-2015

937 views

Category:

Technology


5 download

DESCRIPTION

How to open sharepoint document (web apps) inside windows 8 metroo app without showing the login page

TRANSCRIPT

Page 1: Open office doc inside windows metro app

Open office doc inside Windows Metro AppBY:ASHISH AGRAWAL

Page 2: Open office doc inside windows metro app

Problem Statement How to open SharePoint document inside windows 8/8.1 metro app inside a web view

login should happen seamlessly and app should be able to automatically open office web app inside web view

Page 3: Open office doc inside windows metro app

Solution Using WebView.NavigateWithHttpRequestMessage(httpRequestMessage) API

Using this API, we can pass the requestmessage with desired cookie to webview.

Steps: Login to office 365 account Save the rtfa and fedauth cookie create the httpRequestMessage and add cookie header to it change the URL as sharepoint document URL Make navigate request with this httpRequestMessage

Page 4: Open office doc inside windows metro app

Sample Code var httpRequestMessage = new Windows.Web.Http.HttpRequestMessage(Windows.Web.Http.HttpMethod.Get, uriFormat);

uriFormat should be sharepoint document URL

httpRequestMessage.Headers.Cookie.Add(“cookie-name”,”cookie-value”);

WebView.NavigateWithHttpRequestMessage(httpRequestMessage);

Page 5: Open office doc inside windows metro app

Thanks