question

AlumniComp16LAXMISWAMI-6030 avatar image
0 Votes"
AlumniComp16LAXMISWAMI-6030 asked NicoZhu-MSFT commented

The text associated with this error code could not be found. No more Internet handles can be allocated

Hi,

 await messageWebSocket.ConnectAsync(new Uri(URL));

I am getting this error while connecting websocket in my uwp app. This problem occurs when the internet reconnects and the application is in a suspended state. Internet speed is fine and it also connects after exiting the application but does not automatically reconnect after resuming app.

On another system I get this error - The text associated with this error code could not be found. A connection with the server could not be established.


and if I run an API to check either internet is available or not it still give response.StatusCode=0
for example- https://s3.amazonaws.com

windows-uwp
· 7
5 |1600 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.

Derive from official code sample, we need to close the socket when page navigate from. Base on you scenario, Do you close the socket when app suspend, and re-connect after resuming app. We we also suggest your close the socket when network disconnect. for detecting the network state , you could use NetworkHelper.


1 Vote 1 ·

Yes. i am properly closing and disposing the WebSocket after internet disconnection and when the app gets suspended. It started giving me issues recently earlier it used to work. Nothing changed at code base so I wanted to know if something at the store side or Microsoft changed any event.

I am using NetworkHelper events to check if the network is available or not but sometimes it doesn't get fired that is the reason I am calling this API to ensure about internet connectivity

0 Votes 0 ·
NicoZhu-MSFT avatar image NicoZhu-MSFT AlumniComp16LAXMISWAMI-6030 ·

Have you update your OS recently, if so, please share your os version and your app's target and min version.

0 Votes 0 ·
Show more comments

0 Answers