snipt

Ctrl+h for KB shortcuts

C#

[IIs7] Add Application to Exsiting Site

1
2
3
4
5
ServerManager iisManager = new ServerManager();
iisManager.Sites["NewSite"].Applications.Add("/Sales", "d:\\MyApp");
iisManager.Update(); 

//This sample uses the Sites collection Indexer to get NewSite site and uses the Applications collection to add a new http://localhost/Sales application. 
https://snipt.net/embed/591151c4c6d6bebbfd99ff07ce596363/
https://snipt.net/raw/591151c4c6d6bebbfd99ff07ce596363/
591151c4c6d6bebbfd99ff07ce596363
csharp
C#
6
2016-09-22T06:02:00
True
False
False
/api/public/snipt/37580/
iis7-add-application-to-exsiting-site
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="n">ServerManager</span> <span class="n">iisManager</span> <span class="p">=</span> <span class="k">new</span> <span class="n">ServerManager</span><span class="p">();</span> </span><span id="L-2"><a name="L-2"></a><span class="n">iisManager</span><span class="p">.</span><span class="n">Sites</span><span class="p">[</span><span class="s">&quot;NewSite&quot;</span><span class="p">].</span><span class="n">Applications</span><span class="p">.</span><span class="n">Add</span><span class="p">(</span><span class="s">&quot;/Sales&quot;</span><span class="p">,</span> <span class="s">&quot;d:\\MyApp&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="n">iisManager</span><span class="p">.</span><span class="n">Update</span><span class="p">();</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="c1">//This sample uses the Sites collection Indexer to get NewSite site and uses the Applications collection to add a new http://localhost/Sales application. </span> </span></pre></div> </td></tr></table>
iis

Text only

Increase the IIS connection limit

1
2
3
cd C:\inetpub\adminscripts

cscript adsutil.vbs set w3svc/MaxConnections 40
https://snipt.net/embed/913ad15b485e807a5e6f89797208657e/
https://snipt.net/raw/913ad15b485e807a5e6f89797208657e/
913ad15b485e807a5e6f89797208657e
text
Text only
3
2016-09-22T06:02:16
True
False
False
/api/public/snipt/7275/
increase-the-iis-connection-limit
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>cd C:\inetpub\adminscripts </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>cscript adsutil.vbs set w3svc/MaxConnections 40 </span></pre></div> </td></tr></table>
cmd, iis, win
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.