Question: tried to display the name of the department that has the least student count.

Answer: 
I found the answer of my question. sure after lot and lots of google.

By default POST, PUT methods are not allowed in webAPI. You either need to use CORS package for that or another solution is (I used to fix my issue)...

Add below config in web.config

```
<system.webServer>
     <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Headers" value="Content-Type" />
        <add name="Access-Control-Allow-Methods" value="GET,POST,PUT,DELETE,OPTIONS" />
        <add name="Access-Control-Allow-Credentials" value="true" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>

```

and you also need to flush your OPTIONS request. Add below code in Global.aspx file...

```
protected void Application_BeginRequest()
        {
            if (Request.Headers.AllKeys.Contains("Origin") && Request.HttpMethod == "OPTIONS")
            {
                Response.Flush();
            }
        }

```
The best way is to use CORS package. 
Simply install package Owin.Cors at the Nuget package Console

```
Install-Package Microsoft.Owin.Cors 

```

After this, you need to add the configuration at your startup.cs.
It will look something similar like below.

```
public void Configuration(IAppBuilder app)
        {
            HttpConfiguration config = new HttpConfiguration();

            ConfigureOAuth(app);

            WebApiConfig.Register(config);
            app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
            app.UseWebApi(config);

        }

```