Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1863

Multiple custom attributes of the same type found error.

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4
    • Component/s: None
    • Labels:
      None
    • Environment:
      Azure Cloud Service OS Family 5

      We are having a strange issue, probably related to bug CSHARP-1807. Using full .NET Framework we are now using System.Runtime.InteropServices.RuntimeInformation 4.0.1.0 (coming from NuGet package 4.3.0.0) and when app runs on an Azure Cloud Service we have following exception:

       	 	 	
      Multiple custom attributes of the same type found. 
      at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) 
      at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) 
      at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) 
      at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) 
      at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) 
      Multiple custom attributes of the same type found. 
      at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) 
      at System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription() 
      at System.Lazy`1.CreateValue() 
      at System.Lazy`1.LazyInitValue() 
      at MongoDB.Driver.Core.Connections.ClientDocumentHelper.CreateClientDocument(String applicationName) 
      at MongoDB.Driver.Core.Connections.BinaryConnectionFactory..ctor(ConnectionSettings settings, IStreamFactory streamFactory, IEventSubscriber eventSubscriber) 
      at MongoDB.Driver.Core.Configuration.ClusterBuilder.BuildCluster() 
      at MongoDB.Driver.ClusterRegistry.CreateCluster(ClusterKey clusterKey) 
      at MongoDB.Driver.ClusterRegistry.GetOrCreateCluster(ClusterKey clusterKey) 
      at MongoDB.Driver.MongoClient..ctor(MongoClientSettings settings) 
      at 
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            ivan.fioravanti@4ward.it Ivan Fioravanti
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: