URLConnection Error

I’m getting an error event in a URL connection. All I’m seeing is ErrorNumber 5023.
I can’t find where error codes are listed in the documentation and a google search only came up with MS SQL Sever related issues.

Can anyone shed some light on this?

May a windows system error code?

1 Like

The English version of that error number from Thomas’ link says:

5023 (0x139F)
The group or resource is not in the correct state to perform the requested operation.

Are you re-using a URLConnection object to perform more than one request?

Tim, that’s a good question. Double checking…

OK, so I am not reusing but on further inspection I am getting a 401 on the socket.
Oddly it works great from Mac.

More info, and this is strange.

in AuthenticationRequested I am only supplying a name (not password) as is required by the system I’m connecting to.
On Mac the realm is populated and on windows it isn’t

I’m doing a SendSync and it all works great on Mac.
On windows I get the error raised with a http status of 401.

What’s really odd though is I also get ContentReceived firing (on windows) with the correct response and even there the HTTP Status is 401.

I believe everything is working fine on Linux too - I only know because I was using these calls from XojoCloud.

To me this sounds like a Xojo bug, but maybe there is something else that Windows requires me to set to handle the certificates right - I just don’t know what.

Does this jog any thoughts for anyone?

Just this similar (as in works on Mac and not on Windows):

May not be the same issue.

I’ll build a simple example and send it to Xojo tomorrow.
I’ll sure it is a bug now. Hopefully there is a workaround

Did you try setting the authentication credentials in a header instead of waiting for the event to fire?

See Basic Authentication on this blog post


Will try today. Thanks

You put the V in MVP!


1 Like