How to host Web API with AngularJs inside Virtual Directory on IIS
<p>I am new with Web Api and using n-tier architecture. I have a simple application with AngularJs as javascript framework and using Web Api as RESTFul service. I also have <em>Data Access Layer</em>, <em>Business Logic Layer</em> and a separate layer for <em>Model</em>.Html pages are included in same project containing Api, in Pages folder.
This is my project structure:
<a href="https://i.stack.imgur.com/hb7TV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hb7TV.png" alt="enter image description here"></a></p>

<p>I am trying to host the project on Local IIS. I have changed the servers option from properties of FirstApp.Web to local IIS. Html pages are being displayed fine. The page contains simple login form. Using Angularjs service I am calling the Web Api which is under <em>Controllers</em> folder. </p>

<pre><code>this.authenticate = function (obj) {
        return $http.post('/api/Employee/Validate/', obj, {});
    }
</code></pre>

<p>But it is throwing <a href="https://i.stack.imgur.com/hVKeY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hVKeY.png" alt="enter image description here"></a></p>

<p>Help me to figure out how to host the whole application on local IIS.</p>