question

MangoApps-1236 avatar image
0 Votes"
MangoApps-1236 asked ·

UWP MessageWebSocket not working when manually set proxy

My UWP MessageWebSocket not working behind the proxy when i set proxy manually its through 403 error; Forbidden (403). (Exception from HRESULT: 0x80190193) When I remove manual proxy then it's able to connect successfully

NEED TO USE ANY OTHER CLASS FOR SOCKET CONNECTION BEHIND PROXY LIKR "StreamSocket" etc

HTTPS calls working well only issue with MessageWebSocket

its there anything need to do in code to connect socket connection behind a proxy server?

7424-tinytake14-04-2020-09-23-22-637224332352333136.png

7402-tinytake14-04-2020-09-23-22-637224332352333136.png

uwp
· 5
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, 403 errors are usually caused by reasons such as certificate verification errors or credential errors. Is your message server authenticated? If yes, you can enter your credentials when creating the MessageWebSocket. In your other question, I see that you seem to have noticed this. And you can check the request header changes when the proxy is not set and after the proxy is set to analyze the possible cause of the problem.

0 Votes 0 · ·

No, my server doesn't have any credentials and if there are any errors in certificate or credential how my "Https" call working and only problem with TCP/Socket and we are not setting any request header from client its just URL:- wss://hubnew2.example.com:5223 Port:- 5223 await messageWebSocket.ConnectAsync(new Uri(URL));

0 Votes 0 · ·

Hi, I can't reproduce your problem for the time being, you can try to listen to the MessageWebSocket.ServerCustomValidationRequested event, which applies to wss, here is the relevant documentation. You can check whether the event is triggered.

1 Vote 1 · ·
Show more comments

0 Answers