Exemplo n.º 1
0
        private static string GetKey()
        {
            string skey;
            ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
            string port = (string)localSettings.Values["localport"];

            using (HttpBaseProtocolFilter filter = new HttpBaseProtocolFilter()) {
                HttpCookieCollection cookieCollection = filter.CookieManager.GetCookies(new Uri("http://localhost:" + port + "/login"));
                skey = cookieCollection.First().Value;
            }
            return(skey);
        }