open office doc inside windows metro app
DESCRIPTION
How to open sharepoint document (web apps) inside windows 8 metroo app without showing the login pageTRANSCRIPT
Open office doc inside Windows Metro AppBY:ASHISH AGRAWAL
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
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
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);
Thanks