title: Angular2 HTTP service for localhost Web API running on different port
body: <p>I am getting below error when using HTTP service in angular2 with localhost WEB Api. When using URL directly in browser it is working fine and returning JSON result.</p>
  
  <p><strong>An error occurred Response with status: 404 Not Found for URL: null</strong></p>
  
  <pre><code> import { Headers, Http } from '@angular/http';
   import 'rxjs/add/operator/toPromise';
  
   @Injectable()
   export class QuizDalService {
  
   private quizquestionUrl = 'http://localhost:59786/api/AngularQuiz';
  
   constructor(private http: Http) { }
  
   getQuizQuestions(name: string): Promise&lt;mcquestion[]&gt;{
   return this.http.get(this.quizquestionUrl)
                          .toPromise()
                          .then(response =&gt; response.json().data as mcquestion[])
                          .catch(this.handleError);
     }
  }
  </code></pre>
  
  <p>Please let me know if I am missing anything.</p>