title: Cors with SignalR - solving the "The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' error
body: <p>I am working with Angular 2 and ASP.NET Core with SignalR.</p>
  <p>I have the error shown below:</p>
  <blockquote>
  <p>XMLHttpRequest cannot load
  http://localhost:55916/signalr//signalr/negotiate?clientProtocol=1.5&amp;connectionData=%5B%7B%22name%22%3A%22event%22%7D%5D&amp;_=1486394845411.
  The value of the 'Access-Control-Allow-Origin' header in the response
  must not be the wildcard '*' when the request's credentials mode is
  'include'. Origin 'http://localhost:8080' is therefore not allowed
  access. The credentials mode of requests initiated by the
  XMLHttpRequest is controlled by the withCredentials attribute.</p>
  </blockquote>
  <p>There is my app config:</p>
  <pre><code>   public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
          {
              var signingKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(Configuration[&quot;data:secretKey&quot;]));
  
              loggerFactory.AddConsole(Configuration.GetSection(&quot;Logging&quot;));
              loggerFactory.AddDebug();
                          
  
              app.UseCors(config =&gt;
                   config.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin());
  
              app.UseWebSockets();
              app.UseSignalR(&quot;/signalr&quot;);
  
              app.UseMvc();
          }
  </code></pre>
  <p>I have also Angular 2 SignalR service witch</p>
  <pre><code>constructor(){
   //setups...
  
    this.connection = $.hubConnection(this.baseUrl + 'signalr/');
      this.proxy = this.connection.createHubProxy(this.proxyName);
  
      this.registerOnServerEvents();
  
      this.startConnection();
  }
  </code></pre>
  <p>regiestering server events:</p>
  <pre><code> private registerOnServerEvents(): void {
          this.proxy.on('FoodAdded', (data: any) =&gt; {
              debugger;
              this.foodchanged.emit(data);
          });
  
          this.proxy.on('FoodDeleted', (data: any) =&gt; {
              debugger;
              this.foodchanged.emit('this could be data');
          });
  
          this.proxy.on('FoodUpdated', (data: any) =&gt; {
              debugger;
              this.foodchanged.emit('this could be data');
          });
  
          this.proxy.on('SendMessage', (data: ChatMessage) =&gt; {
              debugger;
              console.log('received in SignalRService: ' + JSON.stringify(data));
              this.messageReceived.emit(data);
          });
  
          this.proxy.on('newCpuValue', (data: number) =&gt; {
              debugger;
              this.newCpuValue.emit(data);
          });
      }
  </code></pre>
  <p>The error begins at the beginning.</p>