Azure SignalR Service Connection is not active
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I updated our signalr packages from 2.4.0 and added RunAzureSignalR
instead of RunSignalR
. Added this code in de Startup.cs
app.Map("/signalr", map =>
{
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true
};
map.RunAzureSignalR(typeof(Startup).FullName, hubConfiguration, options =>
{
options.ConnectionString = AppApiSettings.SignalRServiceConnectionString;
});
});
But when I try to send a message to the hub I get an exception The connection is not active, data cannot be sent to the service.
. Can't find any reason this would happen or why the service would not run.
When I use RunSignalR (self hosted) everything runs great.
Any help would be greatly appreciated.
asp.net-mvc signalr-2 azure-signalr
add a comment |
I updated our signalr packages from 2.4.0 and added RunAzureSignalR
instead of RunSignalR
. Added this code in de Startup.cs
app.Map("/signalr", map =>
{
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true
};
map.RunAzureSignalR(typeof(Startup).FullName, hubConfiguration, options =>
{
options.ConnectionString = AppApiSettings.SignalRServiceConnectionString;
});
});
But when I try to send a message to the hub I get an exception The connection is not active, data cannot be sent to the service.
. Can't find any reason this would happen or why the service would not run.
When I use RunSignalR (self hosted) everything runs great.
Any help would be greatly appreciated.
asp.net-mvc signalr-2 azure-signalr
add a comment |
I updated our signalr packages from 2.4.0 and added RunAzureSignalR
instead of RunSignalR
. Added this code in de Startup.cs
app.Map("/signalr", map =>
{
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true
};
map.RunAzureSignalR(typeof(Startup).FullName, hubConfiguration, options =>
{
options.ConnectionString = AppApiSettings.SignalRServiceConnectionString;
});
});
But when I try to send a message to the hub I get an exception The connection is not active, data cannot be sent to the service.
. Can't find any reason this would happen or why the service would not run.
When I use RunSignalR (self hosted) everything runs great.
Any help would be greatly appreciated.
asp.net-mvc signalr-2 azure-signalr
I updated our signalr packages from 2.4.0 and added RunAzureSignalR
instead of RunSignalR
. Added this code in de Startup.cs
app.Map("/signalr", map =>
{
var hubConfiguration = new HubConfiguration
{
EnableDetailedErrors = true
};
map.RunAzureSignalR(typeof(Startup).FullName, hubConfiguration, options =>
{
options.ConnectionString = AppApiSettings.SignalRServiceConnectionString;
});
});
But when I try to send a message to the hub I get an exception The connection is not active, data cannot be sent to the service.
. Can't find any reason this would happen or why the service would not run.
When I use RunSignalR (self hosted) everything runs great.
Any help would be greatly appreciated.
asp.net-mvc signalr-2 azure-signalr
asp.net-mvc signalr-2 azure-signalr
asked Jan 4 at 13:27
Youp HulsebosYoup Hulsebos
11618
11618
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It turns out Azure Service only support TLS1.2 for security concerns.
Please add following code to your Startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The hint for this solution was found on a github ticket: https://github.com/Azure/azure-signalr/issues/279
"No server available" indicates that your app server has trouble connecting to Azure service. You can enable tracing from the app server side with the following to see if any error throws.
GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;
A sample here: https://github.com/Azure/azure-signalr/blob/dev/samples/AspNet.ChatSample/AspNet.ChatSample.SelfHostServer/Startup.cs#L19
If you are local debugging the server side, you can also uncheck "Just My Code" and break when any CLR exception throws:
System.Security.Authentication.AuthenticationException: "A call to SSPI failed, see inner exception."
- (inner) "The function requested is not supported"
System.ObjectDisposedException: 'Safe handle has been closed'
System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'
System.Net.WebSockets.WebSocketException: 'Unable to connect to the remote server'
- (inner) WebException: The request was aborted: Could not create SSL/TLS secure channel.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039861%2fazure-signalr-service-connection-is-not-active%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It turns out Azure Service only support TLS1.2 for security concerns.
Please add following code to your Startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The hint for this solution was found on a github ticket: https://github.com/Azure/azure-signalr/issues/279
"No server available" indicates that your app server has trouble connecting to Azure service. You can enable tracing from the app server side with the following to see if any error throws.
GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;
A sample here: https://github.com/Azure/azure-signalr/blob/dev/samples/AspNet.ChatSample/AspNet.ChatSample.SelfHostServer/Startup.cs#L19
If you are local debugging the server side, you can also uncheck "Just My Code" and break when any CLR exception throws:
System.Security.Authentication.AuthenticationException: "A call to SSPI failed, see inner exception."
- (inner) "The function requested is not supported"
System.ObjectDisposedException: 'Safe handle has been closed'
System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'
System.Net.WebSockets.WebSocketException: 'Unable to connect to the remote server'
- (inner) WebException: The request was aborted: Could not create SSL/TLS secure channel.
add a comment |
It turns out Azure Service only support TLS1.2 for security concerns.
Please add following code to your Startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The hint for this solution was found on a github ticket: https://github.com/Azure/azure-signalr/issues/279
"No server available" indicates that your app server has trouble connecting to Azure service. You can enable tracing from the app server side with the following to see if any error throws.
GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;
A sample here: https://github.com/Azure/azure-signalr/blob/dev/samples/AspNet.ChatSample/AspNet.ChatSample.SelfHostServer/Startup.cs#L19
If you are local debugging the server side, you can also uncheck "Just My Code" and break when any CLR exception throws:
System.Security.Authentication.AuthenticationException: "A call to SSPI failed, see inner exception."
- (inner) "The function requested is not supported"
System.ObjectDisposedException: 'Safe handle has been closed'
System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'
System.Net.WebSockets.WebSocketException: 'Unable to connect to the remote server'
- (inner) WebException: The request was aborted: Could not create SSL/TLS secure channel.
add a comment |
It turns out Azure Service only support TLS1.2 for security concerns.
Please add following code to your Startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The hint for this solution was found on a github ticket: https://github.com/Azure/azure-signalr/issues/279
"No server available" indicates that your app server has trouble connecting to Azure service. You can enable tracing from the app server side with the following to see if any error throws.
GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;
A sample here: https://github.com/Azure/azure-signalr/blob/dev/samples/AspNet.ChatSample/AspNet.ChatSample.SelfHostServer/Startup.cs#L19
If you are local debugging the server side, you can also uncheck "Just My Code" and break when any CLR exception throws:
System.Security.Authentication.AuthenticationException: "A call to SSPI failed, see inner exception."
- (inner) "The function requested is not supported"
System.ObjectDisposedException: 'Safe handle has been closed'
System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'
System.Net.WebSockets.WebSocketException: 'Unable to connect to the remote server'
- (inner) WebException: The request was aborted: Could not create SSL/TLS secure channel.
It turns out Azure Service only support TLS1.2 for security concerns.
Please add following code to your Startup:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
The hint for this solution was found on a github ticket: https://github.com/Azure/azure-signalr/issues/279
"No server available" indicates that your app server has trouble connecting to Azure service. You can enable tracing from the app server side with the following to see if any error throws.
GlobalHost.TraceManager.Switch.Level = SourceLevels.Information;
A sample here: https://github.com/Azure/azure-signalr/blob/dev/samples/AspNet.ChatSample/AspNet.ChatSample.SelfHostServer/Startup.cs#L19
If you are local debugging the server side, you can also uncheck "Just My Code" and break when any CLR exception throws:
System.Security.Authentication.AuthenticationException: "A call to SSPI failed, see inner exception."
- (inner) "The function requested is not supported"
System.ObjectDisposedException: 'Safe handle has been closed'
System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'
System.Net.WebSockets.WebSocketException: 'Unable to connect to the remote server'
- (inner) WebException: The request was aborted: Could not create SSL/TLS secure channel.
answered Jan 8 at 7:42
Youp HulsebosYoup Hulsebos
11618
11618
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54039861%2fazure-signalr-service-connection-is-not-active%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown