I have been trying to connect to the Windows Service created in this tutorial:
http://www.asp.net/signalr/overview/deployment/tutorial-signalr-self-host
The thing is that I do can connect to it using its own client. However, I've tried to connect to it from a console application and haven't had success. Moreover, if I host the SignalR Hub in a console application I can connect to it successfully.
The errors that I got say that my client version isn't compatible with the server and that the connection was refused.
This is how my attempt to connect looks like:
IHubProxy _hub;
string url = #"http://localhost:8080/";
var connection = new HubConnection(url);
_hub = connection.CreateHubProxy("MyHub");
_hub.On("addMessage", x => ShowMessage(x));
connection.Start().Wait();
UPDATE:
-Errors Messages:
1.
Exception:Caught: "You are using a version of the client that isn't compatible with the server. Client version 1.4, server version 1.3." (System.InvalidOperationException)
A System.InvalidOperationException was caught: "You are using a version of the client that isn't compatible with the server. Client version 1.4, server version 1.3."
Time: 2/20/2015 12:03:36 PM
Thread:Worker Thread[5924]
2.
Exception:Thrown: "No connection could be made because the target machine actively refused it" (System.Net.Sockets.SocketException)
A System.Net.Sockets.SocketException was thrown: "No connection could be made because the target machine actively refused it"
Time: 2/20/2015 12:03:36 PM
Thread:Worker Thread[3320]
As pointed by Christophe, this question is a duplicate of SignalR Java client only supports exactly 1.3 and, in my case, was solved by uninstalling and re-installing all the SignalR/Owin packages.
Related
I am trying to connect to a remote ssh server using the SshNet package.
My code looks like this:
List<AuthenticationMethod> authenticationMethods = new List<AuthenticationMethod>();
authenticationMethods.Add(new PasswordAuthenticationMethod(SSHusername, SSHpassword));
SSHConnection = new SshClient(new ConnectionInfo(ip, Int32.Parse(SSHport), SSHusername, authenticationMethods.ToArray()));
SSHConnection.Connect();
When the program tries to make the connection, I get the following exception:
Exception thrown: 'Renci.SshNet.Common.SshConnectionException' in Renci.SshNet.dll
An exception of type 'Renci.SshNet.Common.SshConnectionException' occurred in Renci.SshNet.dll but
was not handled in user code
Server response does not contain SSH protocol identification.
I have been searching for a solution for 2 hours now, but haven't been able to fix it.
Looking through the source code of SshNet if found this error is thrown when the client doesn't get an ssh version from the server. I'm not an expert in this field, but looking at wireshark the server sends a packet with this info:
SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
I'm pretty sure this is the ssh version it's looking for. So I hope one of you guys can tell me what else I can try to fix this.
My Core project has target framework .NET standard 2.0, the UWP project's min version is Windows 10 1903. The SshNet package is on version 2016.1.0
I'm Currently working in Automation test scripts in visual studio for IE browser version 11 using c#.
My test cases not able to run continuously one after the other.It working fine for only one test case, when it trying to attempt 2nd test cases encountering error
Specification:
IE browser ver 11
Selenium.WebDriver.IEDriver
C# (visual studio)
Error:
A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:57525/session//url. The status of the exception was UnknownError, and the message was: No connection could be made because the target machine actively refused it No connection could be made because the target machine actively refused it'
var ieoptions = new InternetExplorerOptions();
ieoptions.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
ieoptions.EnsureCleanSession = true;
builder.RegisterType<InternetExplorerDriver>()
.WithParameter(new TypedParameter(typeof(string), "."))
.WithParameter(new TypedParameter(typeof(InternetExplorerOptions), ieoptions))
.AsImplementedInterfaces()
.InstancePerLifetimeScope();
Note: The same code and approach working for other drivers like Chrome, Chromium and Firefox
Trying to use the Mountebank .Net Client for the test project
_mbClient = new MountebankClient();
_mbClient.DeleteAllImposters();
HttpRequestException: No connection could be made because the target
machine actively refused it
It turns out that the MbDotNet doesn't have Mountebank integrated which makes sense.
I thought that I only need to install this Nuget package and it includes everything.
So the answer is: I need to go to the Mountbank website and install it, after that run
mb
to start the server, then run my Xunit .Net Core code, then the magic will happen.
If you would like a different url to host the MB server, then use its command line command to run it against different port and remember to pass in the new port number into your
MountebankClient constructor.
That's it :)
My .NET Core Web API (Version 2.2 )project Can't able to successfully make connection with Azure SignalR service (free tier). its showing some error is like "Failed to connect to the service, will retry after the back off period. Error detail: Unable to connect to the remote server. The remote certificate is invalid according to the validation procedure.."
my .net core is containerized by local docker installed in my machine and deployed it on the local kubernates clusters. When i deployed the same thing i local iis its working perfectly.
My client application is based on Angular 7.
Tried some of the SSL certificate workarounds like importing azure ssl certificate to browser but issue has not yet resolved.
public void ConfigureServices(IServiceCollection services) {
services.AddCors();
services.AddSingleton < IUserIdProvider, CustomUserIdProvider > ();
services.AddSignalR().AddAzureSignalR(connection => {
connection.ConnectionString = "my_connectionstring";
});
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
}
Expected : Azure signalr Connection need to start and able to send message to clients.
Actual : Failed to connect to the service, will retry after the back off period. Error detail: Unable to connect to the remote server. The remote certificate is invalid according to the validation procedure..
I installed kafka_2.10-0.8.1.1 on a Ubuntu 12.04 (Linux ubuntu 3.8.0-44-generic) hosted by vmware player 6.0.3 build-1895310. On the host machine (Windows 8) I am using the C# client from https://github.com/Jroland/kafka-net. The ip of the kafka machine is correctly configured in C# code, the topic "test" is accordingly created in kafka etc. I get the following messages:
No connection to:http://:9092/. Attempting to re-connect...
Type a message and press enter...
Awaiting message from: http://:9092/
BrokerRouter: Refreshing metadata for topics: test
Failed re-connection to:http://:9092/. Will retry in:1000
Failed re-connection to:http://:9092/. Will retry in:2000
Failed re-connection to:http://:9092/. Will retry in:4000
The same client connects to a physical linux machine with kafka.
I would like to be able to develop with kafka running as a virtual machine. How could I solve the communication issue?
Thanks
I never used the c# version, but is your producer configure correctly?
From the error message, it seems that it doesn't have the IP/DNS configured...
No connection to:http://:9092/