<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Phat Nguyen on Medium]]></title>
        <description><![CDATA[Stories by Phat Nguyen on Medium]]></description>
        <link>https://medium.com/@phat.nguyen?source=rss-c6338f9ea4de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pwLlHzRxwiUkeIclBJff0A.jpeg</url>
            <title>Stories by Phat Nguyen on Medium</title>
            <link>https://medium.com/@phat.nguyen?source=rss-c6338f9ea4de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:57:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@phat.nguyen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Remove HTTP Respond header in IIS 7.5 or Windows Azure]]></title>
            <link>https://medium.com/iis-and-windows-server/remove-http-respond-header-in-iis-7-5-8cb199a9aa4f?source=rss-c6338f9ea4de------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cb199a9aa4f</guid>
            <category><![CDATA[respond-header]]></category>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[isis]]></category>
            <dc:creator><![CDATA[Phat Nguyen]]></dc:creator>
            <pubDate>Sat, 25 Jul 2015 11:25:02 GMT</pubDate>
            <atom:updated>2015-11-16T10:12:38.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qd28JyBy2Z1lpys8iGnhPw.png" /><figcaption>Remove HTTP Respond header in IIS 7.5</figcaption></figure><p><em>Respond header excessive info: Server: Microsoft-IIS/7.5, X-AspNet: Mvc-Version 5.2., X-AspNet-Version: 4.0.303319, X-Powered-By: ASP.NET</em></p><p>This solution below seem to be the best solution for me without vulnerable problem with IIS. This solution don’t need <a href="http://www.iis.net/downloads/microsoft/urlscan">URL Scan 3.1</a> Extention, so you can apply for <strong>Azure </strong>or some system can config the IIS server.</p><h4>1. Removing X-AspNet-Version</h4><p>In <strong>web.config</strong> add</p><blockquote>&lt;system.web&gt; &lt;httpRuntime enableVersionHeader=”false” /&gt;<br>…</blockquote><h4>2. Removing X-AspNetMvc-Version</h4><p>In <strong>Global.asax.cs </strong>add</p><blockquote>protected void Application_Start() { MvcHandler.DisableMvcResponseHeader = true;<br>}</blockquote><h4>3. Removing or changing X-Powered-By</h4><p>In <strong>web.config</strong> add</p><blockquote>&lt;configuration&gt; &lt;system.webServer&gt; &lt;httpProtocol&gt; &lt;customHeaders&gt; &lt;remove name=”X-Powered-By” /&gt; &lt;add name=”X-Powered-By” value=”Phat Nguyen” /&gt; &lt;/customHeaders&gt; &lt;/httpProtocol&gt; &lt;/system.webServer&gt;<br>&lt;/configuration&gt;</blockquote><h4>4. Removing or changing Server</h4><p>Require URL Rewirte of IIS: <a href="http://www.iis.net/downloads/microsoft/url-rewrite">http://www.iis.net/downloads/microsoft/url-rewrite</a> and add an serverVariable=”RESPONSE_SERVER”</p><p>Use outbound rewrite url in <strong>web.config</strong></p><blockquote>&lt;configuration&gt; &lt;system.webServer&gt; &lt;rewrite&gt; &lt;outboundRules&gt; &lt;rule name=”Edit Server respond header”&gt; &lt;match serverVariable=”RESPONSE_Server” pattern=”.+” /&gt; &lt;action type=”Rewrite” value=”<strong>My Server</strong>” /&gt; &lt;/rule&gt; &lt;/outboundRules&gt; &lt;/rewrite&gt; &lt;/system.webServer&gt;<br>&lt;/configuration&gt;</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cb199a9aa4f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iis-and-windows-server/remove-http-respond-header-in-iis-7-5-8cb199a9aa4f">Remove HTTP Respond header in IIS 7.5 or Windows Azure</a> was originally published in <a href="https://medium.com/iis-and-windows-server">IIS and Windows Server</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redirect url from WWW to non-WWW in IIS 7.5]]></title>
            <link>https://medium.com/iis-and-windows-server/redirect-url-from-www-to-non-www-in-iis7-5-4d2909b9704?source=rss-c6338f9ea4de------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d2909b9704</guid>
            <category><![CDATA[windows-server]]></category>
            <category><![CDATA[isis]]></category>
            <category><![CDATA[redirect-url]]></category>
            <dc:creator><![CDATA[Phat Nguyen]]></dc:creator>
            <pubDate>Sat, 25 Jul 2015 09:16:11 GMT</pubDate>
            <atom:updated>2015-07-25T11:32:58.249Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*_rTS8mjaErMQmT9WKNsF6g.png" /></figure><h3>Server infomation and dependence</h3><ul><li>Windows server 2008 R2</li><li>IIS 7.5</li><li>Extention <a href="http://www.iis.net/downloads/microsoft/url-rewrite">URL Rewrite</a> is already installed</li></ul><h3>Step by step</h3><h4>1. Add your website to IIS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*5szLAXXeIaZ9mXv_I1Qh9w.png" /><figcaption>Add your website to IIS</figcaption></figure><p>With no www before the domain</p><h4>2. Add a Site bindings</h4><p>Add one more domain with www.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*zy-wLOJgoMag7A_43PDn1A.png" /><figcaption>Add a Site bindings to you website</figcaption></figure><h4>3. Use URL Rewrite extention</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*bIpUQ8P-FJiypOAsNtM19w.jpeg" /><figcaption>Use URL Rewrite extention</figcaption></figure><p>In URL Rewite</p><ul><li>Click Add rule(s)…</li><li>Choose Canonical domain name.</li><li>Select the primary host name: mydomain.com (without www).</li><li>Now you have a new Rewrite rules. Move up new rule to the top.</li><li>You can open this Rule to see the details rule as below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*v6-i_Ja4yPcKt3yc2Qw9CQ.jpeg" /><figcaption>Inbound rule for Cannonical Host Name IIS 7</figcaption></figure><ul><li>And your <strong>web.config</strong> also changes, this is the result of all abow steps in this section (section 3). And you can <strong>add your rules manually</strong> to web.config instead of use URL Rewrite guide.</li></ul><blockquote>&lt;?xml version=”1.0&quot; encoding=”UTF-8&quot;?&gt;<br>&lt;configuration&gt; &lt;system.webServer&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;rule name=”CanonicalHostNameRule1&quot;&gt; &lt;match url=”(.*)” /&gt; &lt;conditions&gt; &lt;add input=”{HTTP_HOST}” pattern=”^mydomain\.com$” negate=”true” /&gt; &lt;/conditions&gt; &lt;action type=”Redirect” url=”http://mydomain.com/{R:1}” /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; &lt;/system.webServer&gt;<br>&lt;/configuration&gt;</blockquote><p><em>Pretty version is </em><a href="http://pastebin.com/2EB488Qc"><em>here</em></a>.</p><p><strong><em>That’s all you can do to rewrite WWW to non — WWW in IIS7.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d2909b9704" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iis-and-windows-server/redirect-url-from-www-to-non-www-in-iis7-5-4d2909b9704">Redirect url from WWW to non-WWW in IIS 7.5</a> was originally published in <a href="https://medium.com/iis-and-windows-server">IIS and Windows Server</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy and migrate an ASP.NET]]></title>
            <link>https://medium.com/iis-and-windows-server/how-to-deploy-and-migrate-an-asp-net-c38d00166cb6?source=rss-c6338f9ea4de------2</link>
            <guid isPermaLink="false">https://medium.com/p/c38d00166cb6</guid>
            <category><![CDATA[isis]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[aspnet-mvc]]></category>
            <dc:creator><![CDATA[Phat Nguyen]]></dc:creator>
            <pubDate>Fri, 24 Jul 2015 03:20:22 GMT</pubDate>
            <atom:updated>2015-11-12T02:48:16.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5bYvyVT-YqtfUTXUH-Sbw.png" /><figcaption>Deploy and migration an ASP.NET MVC 4 with EF code first</figcaption></figure><h3>Deploy and migrate an ASP.NET MVC 4 project with EF code first to an IIS 7.5 runing in a Windows Server</h3><p><strong><em>Use Visual studio 2013 as publishing tool.</em></strong></p><h3>Do the following step to deploy</h3><h4>First prepare your Server runs with IIS</h4><ul><li>Add IIS to your Server (choose ASP.NET and other need,… )</li><li>Make the .Net integration: run in cmd the following command:</li></ul><blockquote>%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir</blockquote><ul><li>Add a Website and re-config the Application Pool for this Webite runs with .NET 4.0.30319</li><li>Re-config the Site Bindings to route your Website URL</li><li>Install Web Deploy 3.6 (can install via Web platform installer)</li><li>Make sure your server .NET version must be higher than the application.</li></ul><h4>Second prepare your database server</h4><p>I use SQL Server 2012 in the same IIS server, Database server can be a different server with IIS.</p><p>Just start all the database service and prepare your SQL user, connection string for the Third step.</p><h4>Third use Visual studio to publish your Website</h4><p><em>In this case I use VS 2013, and method One-click publish to publish my Website. My solution have 5 C# projects and 1 MVC Web project.</em></p><ul><li>Right click on your MVC Web project and choose Publish…</li><li>Select a publish target: Custom -&gt; Place a name for new profile.</li><li>Connection profile:– Server: your server IP or server domain<br>– Site name: The name of Website you Add in your IIS server.<br>– User name: Your Windows user / IIS user of server.<br>– Password: The password of user.<br>– Destination URL (not required): Your site URL.</li><li>Settings:<br>– Configuration: Release / Debug when you use your server as Production / Test<br>– Databases: Database context is your connection string in the Second step. My absolute database context is below.<br>– Choose “<strong>Use this connection string at runtime</strong>” for Website in IIS server connect to Database server when runing (also update the destination web.config), and “<strong>Excute Code First Migrations</strong>” to the code first update your Database in Database server.</li></ul><blockquote><em>Data Source=(local);Initial Catalog=MyAppDB;Integrated Security=True;User ID=sa;Password=*****;MultipleActiveResultSets=True</em></blockquote><ul><li>Preview:<br>Start Preview to see what files, folder will be uploaded to the IIS server and also confirm no Error in the solution.</li><li>Publish:<br>– Wait to VS publish Website to IIS server.<br>– VS will open your Destination URL to see your result.<br>– DONE!</li></ul><h3>How about migration?</h3><ul><li>With the profile in deploy you just need to use Publish again to migrate your new things updated on IIS and database server.</li><li>Remember “<strong>Excute Code First Migrations</strong>” is chosen in Publish Web Settings.</li></ul><h3>How about the performence?</h3><p>I use a server to run Windows server 2008, Microsoft SQL Server 2012, IIS server 7.5, the system requirement:</p><ul><li>45GB SSD (60GB is recommended)</li><li>CPU 2 cores 2.0 GHz (4 cores is recommended)</li><li>2GB Ram (4GB is recommended)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c38d00166cb6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/iis-and-windows-server/how-to-deploy-and-migrate-an-asp-net-c38d00166cb6">Deploy and migrate an ASP.NET</a> was originally published in <a href="https://medium.com/iis-and-windows-server">IIS and Windows Server</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>