The method or operation is not implemented: Reset all sessions in my application
<p>I want to reset all session in my web app hosted on IIS version 10. I am using this code and added reference of <code>Microsoft.Web.Administration.dll</code> version 7.0 from nuget: </p>

<pre><code>   public void RecycleAppPool()
    {
        using (ServerManager iisManager = new ServerManager())
        {
            SiteCollection sites = iisManager.Sites;
            foreach (Site site in sites)
            {
            if (site.Name == stingEnvironment.ApplicationHost.GetSiteName())
                {
                    **iisManager.ApplicationPools[site.Applications["/"].ApplicationPoolName].Recycle();**
                    break;
                }
            }
        }
    }
</code></pre>

<p>but the above line raises an exception:</p>

<blockquote>
  <p>The method or operation is not implemented.</p>
</blockquote>

<p>What am I missing?</p>