【发布时间】:2017-05-10 20:24:33
【问题描述】:
如果我使用 http URI,下面的代码对我来说可以正常工作,但对于等效的 https 替代方案则失败。当在另一台机器上构建和运行时,或者当我将它包含在另一个应用程序中时,它可以正常工作。
GetStringAsync 引发异常:“在 .exe 中的 0x770B5722 (KernelBase.dll) 处引发异常:0x000006F4:将空引用指针传递给存根。发生”。
ThreadPool::RunAsync(ref new WorkItemHandler([this](IAsyncAction^ action)
{
HttpClient^ client = ref new HttpClient();
auto uri = ref new Uri(L"https://....");
auto t = create_task(client->GetStringAsync(uri));
t.then([](String^ response)
{
// response should be valid.
});
}));
【问题讨论】:
标签: https windows-runtime uwp windows-store-apps httpclient