草庐IT

PHONE_STATE

全部标签

c# - Windows Phone 8.1 中的设备唯一 ID

如何在WindowsPhone8.1中获取设备唯一ID?使用DeviceExtendedProperties.GetValue("DeviceUniqueId")的旧方法不适用于Windows通用应用程序。 最佳答案 privatestringGetDeviceID(){HardwareTokentoken=HardwareIdentification.GetPackageSpecificToken(null);IBufferhardwareId=token.Id;HashAlgorithmProviderhasher=HashAl

c# - Windows Phone 8.1 中的设备唯一 ID

如何在WindowsPhone8.1中获取设备唯一ID?使用DeviceExtendedProperties.GetValue("DeviceUniqueId")的旧方法不适用于Windows通用应用程序。 最佳答案 privatestringGetDeviceID(){HardwareTokentoken=HardwareIdentification.GetPackageSpecificToken(null);IBufferhardwareId=token.Id;HashAlgorithmProviderhasher=HashAl

c# - 我应该如何在 Windows Phone 7 上使用 RestSharp 实现 ExecuteAsync?

我正在尝试使用RestSharpGitHubwiki上的文档实现对我的RESTAPI服务的调用,但我特别遇到ExecuteAsync方法的问题。目前,我的API类代码如下所示:publicclassHarooApi{conststringBaseUrl="https://domain.here";readonlystring_accountSid;readonlystring_secretKey;publicHarooApi(stringaccountSid,stringsecretKey){_accountSid=accountSid;_secretKey=secretKey;}pu

c# - 我应该如何在 Windows Phone 7 上使用 RestSharp 实现 ExecuteAsync?

我正在尝试使用RestSharpGitHubwiki上的文档实现对我的RESTAPI服务的调用,但我特别遇到ExecuteAsync方法的问题。目前,我的API类代码如下所示:publicclassHarooApi{conststringBaseUrl="https://domain.here";readonlystring_accountSid;readonlystring_secretKey;publicHarooApi(stringaccountSid,stringsecretKey){_accountSid=accountSid;_secretKey=secretKey;}pu

c# - 为 Windows RT (windows 8.1/windows phone 8.1) 使用客户端证书

我正在尝试Windows8.1和WindowsPhone8.1的一项新功能,即证书存储和在服务器端使用客户端证书进行客户端身份验证的可能性。但是我在使用此功能时遇到问题。我有一个在IISExpress上运行的经过基本测试的WCF服务。IISexpress配置为支持SSL和客户端证书。在IIS(configurationhost.config)的配置文件中,我设置了这个:(triedalsoSslNegotiateCert)我已经在WindowsRT应用程序中添加了客户端证书,如下所示://Installtheselfsignedclientcerttotheusercertificat

c# - 为 Windows RT (windows 8.1/windows phone 8.1) 使用客户端证书

我正在尝试Windows8.1和WindowsPhone8.1的一项新功能,即证书存储和在服务器端使用客户端证书进行客户端身份验证的可能性。但是我在使用此功能时遇到问题。我有一个在IISExpress上运行的经过基本测试的WCF服务。IISexpress配置为支持SSL和客户端证书。在IIS(configurationhost.config)的配置文件中,我设置了这个:(triedalsoSslNegotiateCert)我已经在WindowsRT应用程序中添加了客户端证书,如下所示://Installtheselfsignedclientcerttotheusercertificat

c# - 在 Windows Phone 8.1 通用应用程序中隐藏状态栏

如何在WindowsPhone8.1(C#、XAML)中隐藏状态栏?在WindowsPhone8中,这是通过在任何页面设置shell:SystemTray.IsVisible="False"来完成的。但它在WindowsPhone8.1中不可用 最佳答案 随着WindowsPhone8.1SDK的发布,出现了一个新的StatusBar。StatusBar取代了WindowsPhoneSilverlightApps中的SystemTray。与SystemTray不同,StausBar只能通过代码访问,并且某些功能已更改。StatusB

c# - 在 Windows Phone 8.1 通用应用程序中隐藏状态栏

如何在WindowsPhone8.1(C#、XAML)中隐藏状态栏?在WindowsPhone8中,这是通过在任何页面设置shell:SystemTray.IsVisible="False"来完成的。但它在WindowsPhone8.1中不可用 最佳答案 随着WindowsPhone8.1SDK的发布,出现了一个新的StatusBar。StatusBar取代了WindowsPhoneSilverlightApps中的SystemTray。与SystemTray不同,StausBar只能通过代码访问,并且某些功能已更改。StatusB

c# - 尝试导出 X509 私钥的 RSAParameters 时出现 CryptographicException "Key not valid for use in specified state."

我盯着这个看了很长一段时间,感谢MSDNdocumentation我真的不知道发生了什么。基本上,我将光盘中的PFX文件加载到X509Certificate2中,并尝试使用公钥加密字符串并使用私钥解密。为什么我感到困惑:当我将引用传递给RSACryptoServiceProvider本身时,加密/解密工作:byte[]ed1=EncryptRSA("foo1",x.PublicKey.KeyasRSACryptoServiceProvider);stringfoo1=DecryptRSA(ed1,x.PrivateKeyasRSACryptoServiceProvider);但是如果导

c# - 尝试导出 X509 私钥的 RSAParameters 时出现 CryptographicException "Key not valid for use in specified state."

我盯着这个看了很长一段时间,感谢MSDNdocumentation我真的不知道发生了什么。基本上,我将光盘中的PFX文件加载到X509Certificate2中,并尝试使用公钥加密字符串并使用私钥解密。为什么我感到困惑:当我将引用传递给RSACryptoServiceProvider本身时,加密/解密工作:byte[]ed1=EncryptRSA("foo1",x.PublicKey.KeyasRSACryptoServiceProvider);stringfoo1=DecryptRSA(ed1,x.PrivateKeyasRSACryptoServiceProvider);但是如果导