HttpRequest.TransportInformation 在 UWP 应用程序中不可用
HttpRequest.TransportInformation not available in UWP app
我需要在我的 UWP 应用程序中验证网站的 SSL 证书,我正在按照此 URL 中描述的方法进行操作:https://docs.microsoft.com/en-us/windows/uwp/security/intro-to-secure-windows-app-development,但是没有 TransportInformation 属性在我的 IDE 中的 RequestMessage class 下可用,智能感知也抱怨它。我正在使用 VS2017,.NetCore 5.3.3,目标版本 15063 最低版本 10586。请帮忙!
确保您使用的是 Windows.Web.Http.HttpRequestMessage 而不是 System.Net.Http.HttpRequestMessage。 TransportInformation 仅是 Windows.Web 版本的成员。
您可以使用 Visual Studio 的对象浏览器来帮助查找 class 中的 属性。浏览 "My Solution",搜索 TransportInformation,然后 Object Browser 将指向 Windows.Web.Http.HttpRequestMessage.
我需要在我的 UWP 应用程序中验证网站的 SSL 证书,我正在按照此 URL 中描述的方法进行操作:https://docs.microsoft.com/en-us/windows/uwp/security/intro-to-secure-windows-app-development,但是没有 TransportInformation 属性在我的 IDE 中的 RequestMessage class 下可用,智能感知也抱怨它。我正在使用 VS2017,.NetCore 5.3.3,目标版本 15063 最低版本 10586。请帮忙!
确保您使用的是 Windows.Web.Http.HttpRequestMessage 而不是 System.Net.Http.HttpRequestMessage。 TransportInformation 仅是 Windows.Web 版本的成员。
您可以使用 Visual Studio 的对象浏览器来帮助查找 class 中的 属性。浏览 "My Solution",搜索 TransportInformation,然后 Object Browser 将指向 Windows.Web.Http.HttpRequestMessage.