How to make XSockets.WebSocket work on HTTPS? - websocket

First I'd like to apologize if this question has already been answered on other posts.
I'm pretty new in WebSockets and WebRTC and here's my scenario.
I created an MVC4 application in VS 2012 and install the a sample WebRTC project via nuget package manager console (followed the steps here: http://xsockets.net/blog/tutorial-building-a-multivideo-chat-with-webrtc).
This seems to work fine on my local machine. I deployed the code on our https server (running on IIS6) and I changed the connection string to handle the https connection (code below:)
peerBroker = new XSockets.WebSocket("wss://mydomain.com:443/CustomBroker");
I then hit the URL and I got an error that says:
WebSocket connection to 'wss://mydomain.com/CustomBroker' failed: Error during WebSocket handshake: Unexpected response code: 401
Does anyone have an idea as to what I'm missing here?

You cant just change the connectionstring to be wss.
Have you configured XSockets to run over wss?
See XSockets Configuration

Related

Trying standard why of ASP.NET Core 5 Signalr and Angular but it is showing error in console .error : websocket faild to connect

I'm trying to use SignalR in ASP.NET Core 5; I've added SignalR service in service configuration and also created a hub class and its method with Angular, which is also configured as I saw on websites there codes similar but still getting below error please some help me:
Error: Failed to start the connection:
Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.
This Previous question was from me ,Actually from 4 days i was facing issue in signalr Configuration but the error issue Reason was Port Number Incidently i changed My port number from application properties (Debug Properties) but forgot to change the application path in angular signalR configuration which was not showing any cores issue and i was being confused for 4 days. << I changed angular signalR Configuration withUrl path to right path and issue resolved

WSDL Authentication Error Appearing on web reference connection

When adding a web reference to a visual studio 2019 web service project I am getting the following errors:
" - The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream."
and
"The custom tool 'MSDiscoCodeGenerator' failed. Unable to import binding 'Soap11' from namespace http*****"
The server offer three webservices, first web service worked perfectly no issues. The second brings up these errors.
I suppose my question is, seeing as this looks like configuration on the third parties end, is this a visual studio error?
All WSDL offerings from the server work perfectly in the browser and in SOAPUI

worklight 6.0.0 facebook app fails to call a worklight adapter

we are doing worklight app on a android and a desktopenvironment(for facebook) that works fine on the liberty profile server (developer worklight environment).
Know we need to post this app on Facebook but to do this we need to use the https protocol on our WAS server, to do this we set the ip, port, protocol: to our external server, and deploy our app with build for remote server, but when the app tried to call an adapter on the server, the Firefox console returns us this:
[09:58:50.675] "response [https://[publicIP]:[port]/WorklightPocProj/apps/services/../../invoke] success: /*-secure-
{"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"ih80d8pjg6la8ubccb7503b936"}}}*/"
and
[09:58:50.675] "defaultOptions:onFailure Procedure invocation error."
The application security on our WAS server is disabled and the ip/port are reachable too.
if i add to the XML adapter on the procedures securityTest="wl_unprotected" the app runs correctly, but i don't to do this workaround
Is there any configuration that we are missing on the app or in our WAS server?
A lot of time since this question but just for trying to help people that hit this question because of the search "defaultOptions:onFailure Procedure invocation error".
Also facing this issue in Worklight 6.1
In my case I faced this issue because I had the following configuration in the adapter .xml:
<procedure name="anyMethod"></procedure>
This works in the development server, but in a stand alone server (at least in WAS) you have to change it for:
<procedure name="submitAuthentication" securityTest="wl_unprotected"></procedure>
In both cases it is unprotected.

Cannot add web service reference to VS2008, works in VS2010

I’m having trouble adding a reference to an HTTPS web service using Visual Studio 2008, it works fine in Visual Studio 2010 but in VS2008 I get the below error.
Our IT guys tell me that the problem is that VS2008 is not using the IE proxy settings properly so the HTTPS request is getting sent to the HTTP proxy, which always denies all HTTPS requests. However, in VS2010 it works just fine.
They don't know how to fix this if that is indeed the problem.
(As an aside, I have to use VS2008 because I want to use this in an SSIS Script Task, however I've been testing this in a blank console app.)
There was an error downloading 'https://xxxxxxxxxxxx.asmx'.
The operation has timed out
Metadata contains a reference that cannot be resolved: 'https://xxxxxxxxxxxxx.asmx'.
An error occurred while making the HTTP request to https://xxxxxxxxxxxxxxxxxxx.asmx. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
This appears to be a bug in Visual Studio.

Failure instantiating web-service client on xcode app upload

I'm using XCode 4.0.2 to upload my iPhone app to the iTunes app store but get the following error messages:
Failure instantiating web-service client
An exception has occurred: Unable to open url: https://contentdelivery.itunes.apple.com/WebObjects/MZLabelService.woa/ws/MZITunesProducerService?wsdl
Could not connect to Apple's web service
Unable to authenticate the package: 450416349.itmsp
I've got the latest Java version (1.6) and have double checked the network settings in the Java preferences.
Any ideas?
Got to the bottom of it. Running a TCP dump on our firewall discovered that some (but not all) of the requests that XCode made were using the configured proxy, and others were not.
We allowed the proxy to be bypassed completely to test and it all worked fine.
Have you tried using Application Loader? Try that and see if it works. Hope this helps.

Resources