5

I get "found 3 DNS claims in authorization context" in my role on azure. I found a solution here but it doesn't work. At first I added the config setting

<AppContextSwitchOverrides value="Switch.System.IdentityModel.DisableMultipleDNSEntriesInSANCertificate=true" />

It doesn't help.

Then I tried with setting by code

    public override bool OnStart()
    {
        AppContext.SetSwitch("Switch.System.IdentityModel.DisableMul‌​tipleDNSEntriesInSAN‌​Certificate", true);

        return base.OnStart();
    }

The result is the same. I have installed the service bus version 2.7.6 and .net 4.6.2. I cannot update the service bus to a higher version because signalR won't work with a service bus version >= 3.

Community
  • 1
  • 1
vborutenko
  • 4,323
  • 5
  • 28
  • 48
  • ``I have installed service bus version 2.7.6 , .net 4.6.2 . I cannot update service bust to higher version because signalR won't work with service bus version >= 3`` Are you using the Service Bus backplane to distribute messages? do you try to downgrade .net 4.6.2 to .net 4.5? – Fei Han Mar 30 '17 at 07:26
  • Yes,and I really don't want to downgrade .net version – vborutenko Mar 30 '17 at 18:47
  • Possible duplicate of [Azure WebJobs ServiceBus returns Exception: found 2 DNS claims in authorization context](http://stackoverflow.com/questions/34329056/azure-webjobs-servicebus-returns-exception-found-2-dns-claims-in-authorization) – participant May 15 '17 at 06:59

2 Answers2

2

In my case the problem was in Microsoft.AspNet.SignalR.ServiceBus NuGet incompatibility with .NET 4.7.1 so that I had to install Microsoft.AspNet.SignalR.ServiceBus3 instead

Andrii
  • 1,081
  • 1
  • 11
  • 24
1

I create a sample using the Service Bus backplane to distribute messages to each role instance, which works fine on my side. Please refer to it and test it on your side.

configure the backplane in Startup.cs class

public void Configuration(IAppBuilder app)
{
    string connectionString = "<Service Bus connection string>";
    GlobalHost.DependencyResolver.UseServiceBus(new ServiceBusScaleoutConfiguration(connectionString, "FeHanSignalRChat") { TopicCount = 3 });

    app.MapSignalR();
}

packages.config

<?xml version="1.0" encoding="utf-8"?>
<packages>
    <package id="Antlr" version="3.4.1.9004" targetFramework="net462" />
    <package id="bootstrap" version="3.0.0" targetFramework="net462" />
    <package id="jQuery" version="1.10.2" targetFramework="net462" />
    <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.SignalR" version="2.2.1" targetFramework="net462" />
    <package id="Microsoft.AspNet.SignalR.Core" version="2.2.1" targetFramework="net462" />
    <package id="Microsoft.AspNet.SignalR.JS" version="2.2.1" targetFramework="net462" />
    <package id="Microsoft.AspNet.SignalR.ServiceBus" version="2.2.1" targetFramework="net462" />
    <package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.1" targetFramework="net462" />
    <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebApi.HelpPage" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net462" />
    <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net462" />
    <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net462" />
    <package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net462" developmentDependency="true" />
    <package id="Microsoft.Owin" version="2.1.0" targetFramework="net462" />
    <package id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" targetFramework="net462" />
    <package id="Microsoft.Owin.Security" version="2.1.0" targetFramework="net462" />
    <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
    <package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.0.0" targetFramework="net462" />
    <package id="Modernizr" version="2.6.2" targetFramework="net462" />
    <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net462" />
    <package id="Owin" version="1.0" targetFramework="net462" />
    <package id="Respond" version="1.2.0" targetFramework="net462" />
    <package id="WebGrease" version="1.5.2" targetFramework="net462" />
    <package id="WindowsAzure.ServiceBus" version="2.1.0.0" targetFramework="net462" />
</packages>

Messages could be distributed fine, and on Azure portal, I could find topics and subscriptions are created.

enter image description here

Fei Han
  • 26,415
  • 1
  • 30
  • 41