我需要在我的UWP应用中验证网站的SSL证书,并且我遵循此URL中描述的方法:https://docs.microsoft.com/en-us/windows/uwp/security/intro-to-secure-windows-app-development,但我的IDE中的RequestMessage类下没有可用的TransportInformation属性,并且intellisense也抱怨它。我使用VS2017,.NetCore 5.3.3,目标版本15063最低版本10586.请帮忙!
答案 0 :(得分:1)
确保您使用的是Windows.Web.Http.HttpRequestMessage而不是System.Net.Http.HttpRequestMessage。 TransportInformation仅是Windows.Web版本的成员。
您可以使用Visual Studio的对象浏览器来帮助查找属性所在的类。浏览"我的解决方案",搜索TransportInformation,Object Browser将指向您Windows.Web.Http.HttpRequestMessage。