title: AspNet Core issue when deployed in ubuntu server
body: <p>I have several aspnet core applications served in Ubuntu server (16.04.1 LTS (GNU/Linux 4.4.0-97-generic x86_64)), Those applications always have worked very well, they are webapi configured very similar each other, but yesterday I have a problem publishing one of them (just one the other work like a charm), I received an error that honestly I don't understand mostly because I don't recall have done any change related to the error message, I've wasted many hours and I'm going to crazy. I recently upgrade aspnet core version from 1.1 to 2.0.</p>
  
  <p>This is my Program.cs</p>
  
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          Console.Title = "Webtools Service";
  
          BuildWebHost(args).Run();
      }
  
      public static IWebHost BuildWebHost(string[] args)
      {
          var config = new ConfigurationBuilder()
              .SetBasePath(Directory.GetCurrentDirectory())
              .AddJsonFile("hosting.json", true)
              .Build();
  
          return WebHost.CreateDefaultBuilder(args)
              .UseKestrel()
              .UseConfiguration(config)
              .ConfigureAppConfiguration((hostContext, conf) =&gt;
              {
                  var env = hostContext.HostingEnvironment;
                  // delete all default configuration providers
                  conf.Sources.Clear();
                  conf.SetBasePath(env.ContentRootPath);
                  conf.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
                  conf.AddJsonFile("appsettings.local.overrides.json", optional: true);
                  conf.AddEnvironmentVariables();
              })
              .UseContentRoot(Directory.GetCurrentDirectory())
              .UseIISIntegration()
              .UseStartup&lt;Startup&gt;()
              //.UseApplicationInsights()
              .Build();
      }
  }
  </code></pre>
  
  <p>I attach the error trace:</p>
  
  <pre><code>&gt; info:
  &gt; Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
  &gt;       User profile is available. Using '/home/ubuntu/.aspnet/DataProtection-Keys' as key repository; keys
  &gt; will not be encrypted at rest. Application startup exception:
  &gt; System.PlatformNotSupportedException: Windows Principal functionality
  &gt; is not supported on this platform.    at
  &gt; System.Security.Principal.WindowsIdentity.GetCurrent()    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationFolderProvider..ctor(IDictionary
  &gt; environment, String folderName)    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.Transmitter.Initialize()
  &gt; at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Initialize(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptionsSetup.Configure(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptions..ctor(IEnumerable`1
  &gt; configureOptions)
  &gt; --- End of stack trace from previous location where exception was thrown ---    at
  &gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.&lt;&gt;c.&lt;AddApplicationInsightsTelemetry&gt;b__13_1(IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite
  &gt; factoryCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite
  &gt; enumerableCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.ApplicationInsights.AspNetCore.ApplicationInsightsStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder
  &gt; app)    at
  &gt; Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() crit:
  &gt; Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
  &gt;       Application startup exception System.PlatformNotSupportedException: Windows Principal functionality
  &gt; is not supported on this platform.    at
  &gt; System.Security.Principal.WindowsIdentity.GetCurrent()    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationFolderProvider..ctor(IDictionary
  &gt; environment, String folderName)    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.Transmitter.Initialize()
  &gt; at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Initialize(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptionsSetup.Configure(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptions..ctor(IEnumerable`1
  &gt; configureOptions)
  &gt; --- End of stack trace from previous location where exception was thrown ---    at
  &gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.&lt;&gt;c.&lt;AddApplicationInsightsTelemetry&gt;b__13_1(IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite
  &gt; factoryCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite
  &gt; enumerableCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.ApplicationInsights.AspNetCore.ApplicationInsightsStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder
  &gt; app)    at
  &gt; Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
  &gt; 
  &gt; Unhandled Exception: System.PlatformNotSupportedException: Windows
  &gt; Principal functionality is not supported on this platform.    at
  &gt; System.Security.Principal.WindowsIdentity.GetCurrent()    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationFolderProvider..ctor(IDictionary
  &gt; environment, String folderName)    at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.Transmitter.Initialize()
  &gt; at
  &gt; Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Initialize(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptionsSetup.Configure(TelemetryConfiguration
  &gt; configuration)    at
  &gt; Microsoft.Extensions.DependencyInjection.TelemetryConfigurationOptions..ctor(IEnumerable`1
  &gt; configureOptions)
  &gt; --- End of stack trace from previous location where exception was thrown ---    at
  &gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.&lt;&gt;c.&lt;AddApplicationInsightsTelemetry&gt;b__13_1(IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite
  &gt; factoryCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite
  &gt; enumerableCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite
  &gt; constructorCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite
  &gt; scopedCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitSingleton(SingletonCallSite
  &gt; singletonCallSite, ServiceProvider provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite
  &gt; callSite, TArgument argument)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass22_0.&lt;RealizeService&gt;b__0(ServiceProvider
  &gt; provider)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type
  &gt; serviceType)    at
  &gt; Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider
  &gt; provider)    at
  &gt; Microsoft.ApplicationInsights.AspNetCore.ApplicationInsightsStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder
  &gt; app)    at
  &gt; Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()    at
  &gt; Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()    at
  &gt; WebtoolsService.Program.BuildWebHost(String[] args) in
  &gt; /var/NetWebApps/sources/Program.cs:line 26    at
  &gt; WebtoolsService.Program.Main(String[] args) in
  &gt; /var/NetWebApps/sources/Program.cs:line 16
  </code></pre>