title: Access to XMLHttpRequest at from origin
body: <p>I have a angular application , The client side post functionality cannot call the server Api post method.
  Follwing Error display on Console</p>
  
  <p><strong>":64736/api/Tool/SaveBookMark:1 Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
  :4200/#/envision/maps/google:1 Access to XMLHttpRequest at '<a href="http://localhost:64736/api/Tool/SaveBookMark" rel="nofollow noreferrer">http://localhost:64736/api/Tool/SaveBookMark</a>' from origin '<a href="http://localhost:4200" rel="nofollow noreferrer">http://localhost:4200</a>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status."</strong></p>
  
  <p>Client Side : angular 5</p>
  
  <pre><code>    const endpoint = this._api.saveBookMark;
  let body = JSON.stringify(bookmarkModel);
  return this.http.post(endpoint, body, this._api.getJsonOptions())
      .map(this._api.extractData)
      .catch(this._api.handleError);
  </code></pre>
  
  <p>Server Side : Mvc Api</p>
  
  <pre><code>[HttpPost]
      public string SaveBookMark(BookmarkModel bookmarkModel)
      {
          string res = string.Empty;
          try
          {
  
          }
          catch (Exception ex)
          {
          }
          return res;
      }
  </code></pre>