Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.web.administration%28VS.90%29.aspx" rel="nofollow">Microsoft.Web.Administration</a> assembly. Here's how you could set the framework version:</p> <pre><code>using (var manager = new ServerManager()) { // Get the web site given its unique id var site = manager.Sites.Cast&lt;Site&gt;().Where(s =&gt; s.Id == 1).FirstOrDefault(); if (site == null) { throw new Exception("The site with ID = 1 doesn't exist"); } // get the application you want to set the framework version to var application = site.Applications["/vDirName"]; if (application == null) { throw new Exception("The virtual directory /vDirName doesn't exist"); } // get the corresponding application pool var applicationPool = manager.ApplicationPools .Cast&lt;Microsoft.Web.Administration.ApplicationPool&gt;() .Where(appPool =&gt; appPool.Name == application.ApplicationPoolName) .FirstOrDefault(); if (applicationPool == null) { // normally this should never happen throw new Exception("The virtual directory /vDirName doesn't have an associated application pool"); } applicationPool.ManagedRuntimeVersion = "v4.0.30319"; manager.CommitChanges(); } </code></pre> <p>And here's how to set the managed pipeline mode to integrated:</p> <pre><code>using (var manager = new ServerManager()) { // Get the application pool given its name var appPool = manager.ApplicationPools["AppPoolName"]; if (appPool == null) { throw new Exception("The application pool AppPoolName doesn't exist"); } // set the managed pipeline mode appPool.ManagedPipelineMode = ManagedPipelineMode.Integrated; // save manager.CommitChanges(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload