简体   繁体   English

如何获取Windows 8应用程序的本地URL的生成域名?

[英]How do I get the generated domain name for local URL's for a Windows 8 app?

I have a Windows 8 app that downloads the online assets, unzips them into the LocalState folder, and accesses that content when the user is offline. 我有一个Windows 8应用程序,该应用程序下载在线资产,将其解压缩到LocalState文件夹中,并在用户脱机时访问该内容。 I use a custom IUriStreamResolver to provide the content. 我使用自定义IUriStreamResolver提供内容。 The local URL might look like this: 本地URL可能如下所示:

ms-local-stream://package-name_application-key/.../.../

The part I'm after is the application-key . 我需要的部分是application-key While the package-name is in the Package.appmanifest , the application-key is not. package-name位于Package.appmanifestapplication-key不存在。 I've also verified the package-key is not part of the LocalState path. 我还验证了package-key不属于LocalState路径。 I'm wanting to use WebView.BuildLocalStreamUri and it requires the contentIdentifier , this is documented as the concatenation of the package-name and application-key . 我想使用WebView.BuildLocalStreamUri ,它需要contentIdentifier ,这被记录为package-nameapplication-key的串联。

I've done quite a bit of digging through the API's via the Object Browser, and of course I've pretty much exhausted Google and DuckDuckGo (love that search engine BTW), and they've not provided any fruit. 我已经通过对象浏览器对API进行了相当多的挖掘,当然我已经用尽了Google和DuckDuckGo(喜欢BTW的搜索引擎),并且他们没有提供任何成果。

Does anybody know how I can get at that key the app generates and uses for this? 有人知道我如何获得应用程序为此生成和使用的密钥吗?

Apparently it doesn't actually matter what the value is. 显然,什么值实际上并不重要。 It has no bearing on the URL that is formed. 它与所形成的URL没有关系。 I wanted to answer this for the next person trying to use this method. 我想回答下一个尝试使用此方法的人。 It just cannot be null or an empty string . 不能null或空string

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 "如何获取用户名@域格式的当前 Windows 用户名?" - How do I get the current windows user's name in username@domain format? 如何在Windows 10中获取计算机域名 - How do I get the computer domain name in Windows 10 如何在Windows应用商店应用中获取本地主机IP地址? - How do I get the local host IP address in a Windows Store app? 如何在C#中获取使用流生成的文件的名称? - How do I get the name of a file generated with a stream in C#? 如何从URL获取域名 - How to get the domain name from an URL 在IIS Web应用程序中,如何获取Windows用户名? -不是进程用户名 - in an IIS web app, how do I get the windows user name? - not the process username 如何在Windows 8.1(winRT)中获取本地文件夹大小 - How do I get Local folder size in Windows 8.1 (winRT) 如何在 Azure AD 中添加/管理具有域名的本地 windows 用户? - How do I add/manage local windows users with domain names in Azure AD? 如何获取已登录的本地Windows用户列表? - How do I get a list of local Windows users who are logged in? C# - Windows身份验证 - 如何从HttpContext用户获取Full doMain名称(FQDN) - C# - Windows authentication - How to get from HttpContext user's Full doMain name (FQDN)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM