Last post Nov 09, 2016 09:41 PM by sudhakar.kukkala
Jan 15, 2015 10:17 AM|payamgerami|LINK
I would like to authenticate my signalr clients using certificate.
On the client side I have:
Connection = new HubConnection(ServerUri);
var certificate = new X509Certificate2(path);
HubProxy = Connection.CreateHubProxy("MyHub");
I also tried to create a certificate with private key:
var certificate = new X509Certificate2(path, "...");
On the server I have this config:
<access sslFlags="SslNegotiateCert" />
And to get the certificate I tried:
Context.Request.Environment.TryGetValue("ssl.ClientCertificate", out cert)
The first problem is path="signalr". When I use this, the client cannot connect to the server and I get:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data
for the page is invalid.
I tried: path="~" , path="signalr/content" , path="signalr/send" and there is no error but the client certificate on the server is always null.
Any help would be greatly appreciated.
Jan 15, 2015 10:34 PM|Zhi Lv - MSFT|LINK
Welcome to ASP.NET forum.
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
As for this issue, here is an article about 500.19 error, you could check out the causes and try the solutions.
Besides, here are some similar threads, you could refer to them.
SignalR Unable to Authentication with Certificate
As for this issue, here is a tutorial about Authentication and Authorization for SignalR Hubs. Please refer to it.
Besides, here is a similar thread, you could refer to it.
Jan 16, 2015 08:37 AM|payamgerami|LINK
Thank you for the reply.
I have read all the links you refered to already but non of them actually solve the specific problem that I have.
The issue is not about authentication in general, It is specifically about adding a client certificate on the client side and getting that certificate on the signalr server.
So far, I could not manage to make it work, there is either a server error or the certificate on the server is null.
If you have a working sample that you add a client certificate on the client side and getting it on the server, I would greatly appreciate if you could send me that.
Dec 11, 2015 08:23 PM|Diamond5|LINK
I have found the root cause of this whole issue. It turns out that the Signalr is a pickier than web api as far as client certificate authentication.
Nov 09, 2016 09:41 PM|sudhakar.kukkala|LINK
Are you able to find solution for SignalR Unable to Authentication with Certificate
I am also facing same Issue.If dont mind can you please send me complate code to firstname.lastname@example.org