Questions tagged [winrt-httpclient]
19 questions
6
votes
3 answers
Why are network exceptions raised by Windows.Web.Http.HttpClient of type System.Exception instead of something more specific?
Whenever I use the Windows.Web.Http.HttpClient class to make HTTP requests, I always handle network exceptions like this:
HttpResponseMessage response;
try
{
response = await httpClent.GetAsync(new Uri("http://www.microsoft.com"));
}
catch…

Decade Moon
- 32,968
- 8
- 81
- 101
3
votes
0 answers
UWP System.Runtime.Interop.COMException on Debug but System.Exception on Release
I am facing the following problem
My solution is setup using MVVM like this.
A UWP app -> View
A PCL targeting Windows Universal and .NET Framework 4.6 -> ViewModel
A PCL targeting Windows Universal and .NET Framework 4.6 -> Model
In the View…

Corcus
- 1,070
- 7
- 25
3
votes
2 answers
TLS client certificate authentication on UWP Windows Store app
I'm trying to connect to a server that uses TLS with client certificate authentication. Below is a code snippet:
async Task TestClientCertAuth()
{
int iWinInetError = 0;
Uri theUri = new Uri("http://xxx-xxx");
try
{
using…

IMS
- 61
- 8
3
votes
2 answers
Windows.Web.Http.HttpClient + WEB API Windows Authentication
Im using Windows.Web.Http.HttpClient to connect to my WEB API. Application haven't prompted for userid and password, but recently i changed WEB API by moving AuthorizeAttribute filter from Action to Class level. Now my Windows store 8.1 application…

user145610
- 2,949
- 4
- 43
- 75
2
votes
2 answers
How get upload progress?
Sorry for my english. I have a method in which I send the StorageFile to the server. I tried using Windows.Web.Http.HttpClient, but does not work ( getting an invalid response from the server ) , so I use System.Net.Http.HttpClient.
Here is my code…

Georgy
- 97
- 7
2
votes
1 answer
Windows.Web.Http.HttpClient Authorization header without scheme.
I have a winrt app and a Windows.Web.Http.HttpClient
I want to set its Authorization header without using a scheme. My code is as below.
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new…

Corcus
- 1,070
- 7
- 25
2
votes
0 answers
Cookies set in Windows.Web.Http.HttpRequestMessage are ignored on redirects
I'm using HttRequestMessage, and adding a cookie in an IHttpFilter as follows:
public IAsyncOperationWithProgress SendRequestAsync(HttpRequestMessage request)
{
var c = new…

Gordon
- 3,012
- 2
- 26
- 35
1
vote
0 answers
Cannot set HttpBaseProtocolFilter.AllowUI to true on Windows 10 Mobile
I have a UWP app that's using client a certificate for SSL authentication. The certificate is stored in user store, the app is declaring "Shared User Certificates" capability in the manifest, I can see the certificate in collection returned by…

Tomas Karban
- 1,080
- 8
- 24
1
vote
1 answer
Creating A Service Bus SAS Token and Consuming Relay in WinRT
I have a Service Bus Relay (WCF SOAP) I want to consume in my Windows Store App. I have written the code to create a token as well as the client which is below.
The problem is that I get an AuthorizationFailedFault returned with a faultstring…

John Donnelly
- 875
- 1
- 10
- 29
1
vote
0 answers
How to consume AX dynamics web service in windows phone 8.1 universal app
I tried consume a AX dynamics secured web service in windows phone universal app. But i am unable to do so as windows phone run-time doesn't support service models(i.e. It doesn't provide option to add service reference). Hence Microsoft has…

Sai Kiran Pulluri
- 31
- 6
1
vote
1 answer
Httpclient PostAsync return a 404. Webserver receive all post data in good order and complete
this is what i have
using Windows.Web.Http;
using Windows.Web.Http.Headers;
public async static Task FormPost(List> varvaluepair, string hosturl)
{
try
{
Uri cURI;
if…

MNHarun
- 23
- 1
- 9
0
votes
1 answer
Cancel IInputStream.ReadAsync if connection to host is lost
I'm writing a UWP (WinRT) solution that downloads a file from a server and saves to disc while indicating progress. For this purposes I extended the IAsyncOperationWithProgress method.
My problem is that at a single line:
while ((await…

nico van vuuren
- 105
- 1
- 8
0
votes
2 answers
How to convert RednerTargetBitmap image into byteArray for uploading on server in UWP
I have a grid that covers whole screen and i want to make that grid as image and then this image i want to send on server. I have used RenderTargetBitmap for this purpose and successfully make writeablebitmap to save using FileSave Picker. Image…

Shani74
- 43
- 8
0
votes
1 answer
Accessing Exchange Server from universal windows app (winRT)
I used Windows 10 email app to connect to my exchange server, i.e. I have instance of UserDataAccount for my exchange server already set up.
I want to write another app that will use this account to talk to Exchange, and I would like to use only…

Dima
- 699
- 1
- 6
- 18
0
votes
2 answers
How to get data deserialized using Windows.Web.HttpClient?
I need to get list of objects deserialized from Json.
My problem is that this code hangs in line responseMessage = await httpClient.GetAsync(uri); I have checked get and response in Fiddler, I am getting Json in Fiddler, everything has code 200 OK,…

hal9k2
- 127
- 1
- 11