AppContextSwitchOverrides not working, 3 DNS claims found in authorization context

I am getting "3 DNS Claims in Resolution" in my role at azure. I found a solution here but it doesn't work. First I added a config setting

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

      

It does not 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 Service Bus version 2.7.6 and .net 4.6.2. I am unable to upgrade Service Bus to a higher version because signalR will not work with Service Bus version> = 3.

+3


source to share


2 answers


I am building a sample using the Service Bus backplane to propagate messages to each role instance, which works fine on my side. Please refer to it and check it on your side.

configure the backplane in the 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 can be distributed normally, and in the Azure portal I can find threads and signatures being generated.

enter image description here

+1


source


In my case, the problem was Microsoft.AspNet.SignalR.ServiceBus

NuGet incompatibility with .NET 4.7.1, so I had to install Microsoft.AspNet.SignalR.ServiceBus3

instead



0


source







All Articles