<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Manjunath's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/manjug/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/manjug/feed.xml</link>
    <description>DotNet Jockey</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:23:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Running ASP.NET 5 application on Linux</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/running-asp-net-5-application-on-linux</link>
      <pubDate>Wed, 16 Dec 2015 10:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2015/12/16/running-asp-net-5-application-on-linux/</guid>
      <description><![CDATA[In this article we will get to know how to run ASP.NET 5 application on Linux.
Before getting in to...]]></description>
      <content:encoded><![CDATA[<p>In this article we will get to know how to run ASP.NET 5 application on Linux.</p>
<p>Before getting in to ASP.NET 5 part, let&rsquo;s get familiarize with below basic commands which will help you on your Linux boxes</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="312">
<p><span style="background-color: #ffffff;"><strong><span style="color: #000000;">&nbsp;Command</span></strong></span></p>
</td>
<td valign="top" width="312">
<p><span style="background-color: #ffffff;"><strong><span style="color: #000000;">&nbsp;Description</span></strong></span></p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;more, less, cat, tail, tail -f</p>
</td>
<td valign="top" width="312">
<p>&nbsp;View the contents of a file</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;vi, vim, nano</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Edit a file</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;cp, mv</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Copy and move files</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;df &ndash;h, du -h</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Check disk space utilization</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;ls, ls -ltr</p>
</td>
<td valign="top" width="312">
<p>&nbsp;List files</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;uptime, w, top</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Check system uptime</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;sudo su</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Gain super-user privilieges</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;ps , ps &ndash;l</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Process listing</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;Lsof</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Look at process open files and ports</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;ip addr show / ifconfig</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Verify network adapter configuration</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;Netstat</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Network information</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;man</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Help on a command</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;ip route, route, netstat &ndash;r</p>
</td>
<td valign="top" width="312">
<p>&nbsp;View Routing Table&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;netstat -rn, route -n</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Default Gateway</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;iptables --list</p>
</td>
<td valign="top" width="312">
<p>&nbsp;View Firewall rules</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;ip -s link show eth0 , netstat -s</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Network Statistics</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Folder structure in Linux and its explanation</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="312">
<p><span style="background-color: #ffffff;"><strong><span style="color: #000000;">&nbsp;Folder Structure</span></strong></span></p>
</td>
<td valign="top" width="312">
<p><span style="background-color: #ffffff;"><strong><span style="color: #000000;">&nbsp;Explanation</span></strong></span></p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Root Directory where everything is located under this and similar to C:\ in Windows.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/bin</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains system specific binaries and executables.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/boot</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains files required to boot your machine.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/dev&nbsp;</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains files which is used by hardware.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/etc</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains configuration files for your programs.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/home</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains a home directory for each user.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/lib</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains shared libraries.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/lost+found</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains recovered files</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/root</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Home folder for root.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/media</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains folders for media attached like CDs,USBs.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/sbin</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains programs which is run by root.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/proc</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains kernel and process files.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/tmp</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains temporary files stored by application.</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/usr</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Contains application and files by users which are read only</p>
</td>
</tr>
<tr>
<td valign="top" width="312">
<p>&nbsp;/var&nbsp;</p>
</td>
<td valign="top" width="312">
<p>&nbsp;Variable data writable directory.</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p><strong>Steps to get ASP.NET 5 on Ubuntu</strong></p>
<ul>
<li>Install DNVM</li>
<li>Install DNX</li>
<li>Install Libuv</li>
<li>Install git</li>
<li>Download ASP.NET Sample</li>
<li>Run dnx web</li>
</ul>
<p><strong>&nbsp;</strong></p>
<p><strong>Installing .NET Version Manager(DNVM)</strong></p>
<ul>
<li>Install and unzip curl if you have not installed:</li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo apt-get install unzip curl</p>
</td>
</tr>
</tbody>
</table>
<ul>
<li>Download and install DNVM:</li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh &amp;&amp; source &nbsp;~/.dnx/dnvm/dnvm.sh</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;Once you run above command you should be able to run dnvm commands like &ldquo;dnvm list&rdquo;.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Installing .NET Execution Environment (DNX) for .NET Core</strong></p>
<ul>
<li>Install DNX Pre-requisites:</li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev</p>
</td>
</tr>
</tbody>
</table>
<ul>
<li>Install DNX for .NET Core using DNVM:</li>
</ul>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;dnvm upgrade -r coreclr</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;<strong>&nbsp;</strong></p>
<p><strong>Installing Libuv</strong></p>
<p>Libuv is a multi-platform asynchronous IO library that is used by Kestrel, a cross-platform HTTP server for hosting ASP.NET 5 web applications.</p>
<p>To build Libuv run the below commands one after the other:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo apt-get install make automake libtool curl</p>
<p>&nbsp;curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -C /usr/local/src</p>
<p>&nbsp;cd /usr/local/src/libuv-1.4.2</p>
<p>&nbsp;sudo sh autogen.sh</p>
<p>&nbsp;sudo ./configure</p>
<p>&nbsp;sudo make</p>
<p>&nbsp;sudo make install</p>
<p>&nbsp;sudo rm -rf /usr/local/src/libuv-1.4.2 &amp;&amp; cd ~/</p>
<p>&nbsp;sudo ldconfig</p>
</td>
</tr>
</tbody>
</table>
<p>Make sure libuv.so.1 is there under /usr/local/lib after you run above commands.</p>
<p>For now, we have .NET core setup and below steps will help you to download sample ASP.NET 5 application from Git</p>
<p>&nbsp;</p>
<p><strong>Install Git</strong></p>
<p>Run below command to install git:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo apt-get install git</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Download ASP.NET 5 Sample from Git</strong></p>
<p>Run the below command to clone ASP.NET 5 application from git:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo git clone <a href="https://github.com/aspnet/Home.git">https://github.com/aspnet/Home.git</a></p>
</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong></p>
<p><strong>Run DNX Command</strong></p>
<p>Navigate to the directory where the application is installed and in my above example it would have installed 3 applications &ldquo;ConsoleApp&rdquo;, &ldquo;HelloMvc&rdquo; and &ldquo;HelloWeb&rdquo;.</p>
<p>Run below command to execute the &ldquo;ConsoleApp&rdquo; application:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;dnu restore</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;dnx run</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Note</strong>: In case you run into an issue where you get error as:</p>
<table style="width: 632px;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="632">
<p><em>&nbsp;Restore failed</em></p>
<p><em>&nbsp;Access to the path &lsquo;/home/&lt;user&gt;/Home/Sample/&hellip;/ConsoleApp/project.locl.json&rsquo; is denied.</em></p>
</td>
</tr>
</tbody>
</table>
<p>when you run &ldquo;dnu restore&rdquo; command then you need to check the permission on the application directory level. In my case I ran into this issue and ran below command at application directory level to give full permission.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;sudo chmod 777 &lt;foldername&gt;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Understanding IIS HTTPPlatformHandler using Tomcat 8</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/understanding-iis-httpplatformhandler-using-tomcat-8</link>
      <pubDate>Fri, 27 Nov 2015 11:53:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2015/11/27/understanding-iis-httpplatformhandler-using-tomcat-8/</guid>
      <description><![CDATA[In this article we will understand how to setup HTTPPlatformHandler using Tomcat 8.
Note: In my...]]></description>
      <content:encoded><![CDATA[<p>In this article we will understand how to setup HTTPPlatformHandler using Tomcat 8.</p>
<p><strong>Note</strong>: In my below example I have used some hard coded value for simplicity for viewer to follow and can be changed based on the need.</p>
<p>&nbsp;</p>
<p><strong>Step 1: Download Tomcat 8</strong></p>
<p>Go to the URL <a href="https://tomcat.apache.org/download-80.cgi">https://tomcat.apache.org/download-80.cgi</a> and download the zipped package to any of your choice directory, let&rsquo;s say &ldquo;C:\JavaSample\bin&rdquo;.</p>
<p>Once you download the zip file, you can extract into the same location &ldquo;C:\JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28" which I would refer this as my Tomcat Installation directory called as &ldquo;TOMCAT_HOME&rdquo; or CATALINA_HOME.</p>
<p>Catalina is codename for Tomcat 5 and above.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 2: Download and Install Java Development Kit</strong></p>
<p>Go to URL <a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a> and download Java development kit 8 for windows based on the bitness of the machine.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 3: Creating Environmental Variables for Windows</strong></p>
<ul>
<li>Create an Environmental Variable called CATALINA_HOME with value as your Tomcat installation directory. In my example I have created a server variable CATALINA_HOME= C:\JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28.<br /> To confirm open command prompt and check if it has been set correctly.</li>
</ul>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/1200.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/1200.2.png">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/1200.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/1200.2.png" alt="" border="0" /></a>&nbsp;</p>
<ul>
<li>Take a note of location where your Java Development(JDK) is installed and create a environmental variable called &ldquo;JAVA_HOME&rdquo; and set the value to the JDK installed directory. In my example I have set JAVA_HOME=&rdquo;C:\Program Files\Java\jdk1.8.0_65".<br /> To confirm open command prompt and check if it has been set correctly.</li>
</ul>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/6661.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/6661.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/6661.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/6661.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Step 3: Configure Apache Tomcat Server</strong></p>
<p>There are few configuration changes required to setup Tomcat server and in our case we will be changing below files under %CATALINA_HOME%\Conf:</p>
<ol>
<li>Server.xml</li>
<li>Web.xml</li>
<li>Context.xml</li>
</ol>
<p>Open server.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;Connector port="<span style="background-color: #ffff99;">${port.http}</span>" protocol="HTTP/1.1"</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectionTimeout="20000"</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; redirectPort="8443" /&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>Open web.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;servlet&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;default&lt;/servlet-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;org.apache.catalina.servlets.DefaultServlet&lt;/servlet-class&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;debug&lt;/param-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;0&lt;/param-value&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;listings&lt;/param-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;<span style="background-color: #ffff99;">true</span>&lt;/param-value&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;/servlet&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>Open context.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;Context <span style="background-color: #ffff99;">reloadable="true</span>"&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Step 4: Deploy a Java Servlet</strong></p>
<p>In my case, I have used one of the open source Java Servlet and download the code from <a href="https://pebble.sourceforge.net/">https://pebble.sourceforge.net/</a> and copy the pebble.war from the source code to %CATALINA_HOME%\webapps</p>
<p><strong>Step 5: Configure IIS</strong></p>
<ul>
<li>Install the HttpPlatformHandler &ndash; <a href="https://www.microsoft.com/web/gallery/install.aspx?appid=HttpPlatformHandlerv1_0">WebPI</a>/<a href="https://download.microsoft.com/download/8/B/1/8B1DDE49-503D-4159-9418-76C4A365B70B/httpPlatformHandler_x86.msi">x86</a>/<a href="https://download.microsoft.com/download/0/2/C/02CF3C6A-2ED8-43D3-9779-6376EBB80E8A/httpPlatformHandler_amd64.msi">x64</a>.</li>
<li>Create a website and complete the site as below settings:</li>
</ul>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/4375.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/4375.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/4375.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/4375.4.png" alt="" border="0" /></a></p>
<ul>
<li>Create a web.config under your website folder which is c:\JavaSample\web.config and add the httpPlatformHandler configuration as below.</li>
</ul>
&nbsp;&nbsp;&nbsp;
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p>
<p>&lt;configuration&gt;</p>
<p>&nbsp; &lt;system.webServer&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;handlers&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;/handlers&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;httpPlatform processPath="C:\JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28\bin\startup.bat" &nbsp;&nbsp;&nbsp;&nbsp;arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?c:\JavaSample\log.txt"&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;environmentVariables&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;environmentVariable name="JRE_HOME" value="%programfiles%\java\jdk1.8.0_65" /&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;environmentVariable name="CATALINA_HOME" value="c:\JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28" /&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;environmentVariable name="CATALINA_OPTS" value="-Dport.http=%HTTP_PLATFORM_PORT% -Dsomeotherconfig=value" /&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/environmentVariables&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;/httpPlatform&gt;</p>
<p>&nbsp; &lt;/system.webServer&gt;</p>
<p>&lt;/configuration&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Now open a browser and browse&nbsp; <a href="https://localhost/">https://localhost</a> which should show the default Tomcat server's welcome page and then browse <a href="https://localhost/pebble">https://localhost/pebble</a> which should show the website which is deployed under webapps which is served from Tomcat server.</p>
<p>&nbsp;</p>
<p>References:</p>
<p><a href="https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html">https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html</a></p>
<p><a href="https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/">https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Quick Guide to Setup Java Servlet on an Apache Tomcat 8 (on Windows)</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/quick-guide-to-setup-java-servlet-on-an-apache-tomcat-8-on-windows</link>
      <pubDate>Fri, 27 Nov 2015 11:36:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2015/11/27/quick-guide-to-setup-java-servlet-on-an-apache-tomcat-8-on-windows/</guid>
      <description><![CDATA[In this article we will understand how to setup a Java servlet on an Apache Tomacat 8 on...]]></description>
      <content:encoded><![CDATA[<p>In this article we will understand how to setup a Java servlet on an Apache Tomacat 8 on Windows.</p>
<p><strong>Note</strong>: In my below example I have used some hard coded value for simplicity for viewer to follow and can be changed based on the need.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 1: Download Tomcat 8</strong></p>
<p>Go to the URL <a href="https://tomcat.apache.org/download-80.cgi">https://tomcat.apache.org/download-80.cgi</a> and download the zipped package to any of your choice directory, let&rsquo;s say &ldquo;C:\JavaSample\bin&rdquo;.</p>
<p>Once you download the zip file, you can extract into the same location &ldquo;C:\ JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28" which I would refer this as my Tomcat Installation directory called as &ldquo;TOMCAT_HOME&rdquo; or CATALINA_HOME.</p>
<p>Catalina is codename for Tomcat 5 and above.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 2: Download and Install Java Development Kit</strong></p>
<p>Go to URL <a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html">https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</a> and download Java development kit 8 for windows based on the bitness of the machine.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 3: Creating Environmental Variables for Windows</strong></p>
<ul>
<li>Create an Environmental Variable called CATALINA_HOME with value as your Tomcat installation directory. In my example I have created a server variable CATALINA_HOME= C:\JavaSample\bin\apache-tomcat-8.0.28\apache-tomcat-8.0.28.<br /> To confirm open command prompt and check if it has been set correctly.</li>
</ul>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/6560.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/6560.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/6560.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/6560.2.png" alt="" border="0" /></a></div>
<ul>
<li>Take a note of location where your Java Development(JDK) is installed and create an environmental variable called &ldquo;JAVA_HOME&rdquo; and set the value to the JDK installed directory. In my example I have set JAVA_HOME=&rdquo;C:\Program Files\Java\jdk1.8.0_65".<br /> To confirm open command prompt and check if it has been set correctly.</li>
</ul>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/7167.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/7167.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/7167.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/7167.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Step 3: Configure Apache Tomcat Server</strong></p>
<p>There are few configuration changes required to setup Tomcat server and in our case we will be changing below files under %CATALINA_HOME%\Conf:</p>
<ol>
<li>Server.xml</li>
<li>Web.xml</li>
<li>Context.xml</li>
</ol>
<p>Open server.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;Connector port=<span style="background-color: #ffff99;">"9999"</span> protocol="HTTP/1.1"</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectionTimeout="20000"</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; redirectPort="8443" /&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Open web.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;servlet&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;default&lt;/servlet-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;org.apache.catalina.servlets.DefaultServlet&lt;/servlet-class&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;debug&lt;/param-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;0&lt;/param-value&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;listings&lt;/param-name&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;<span style="background-color: #ffff99;">true</span>&lt;/param-value&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &lt;/servlet&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Open context.xml under %CATALINA_HOME%\conf and change the settings as high lightened in yellow:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>&lt;Context <span style="background-color: #ffff99;">reloadable="true"</span>&gt;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Step 4: Deploy a Java Servlet</strong></p>
<p>In my case, I have used one of the open source Java Servlet and download the code from <a href="https://pebble.sourceforge.net/">https://pebble.sourceforge.net/</a> and copy the pebble.war from the source code to %CATALINA_HOME%\webapps.</p>
<p>&nbsp;</p>
<p><strong>Step 5: Start the Tomcat Server</strong></p>
<p>Launch the command prompt in admin mode and navigate to %CATALINA_HOME%\Bin folder and run below command:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>Startup.bat</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Now open a browser and browse&nbsp; <a href="https://localhost:9999/">https://localhost:9999</a> which should show the default Tomcat server's welcome page and then browse <a href="https://localhost:9999/pebble">https://localhost:9999/pebble</a> which should show the website which is deployed under webapps.</p>
<p>You can shut down the Tomcat server by running below command from command prompt by navigating to %CATALINA_HOME%\Bin</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;</p>
<p>Shutdown.bat</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>References:</p>
<p><a href="https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html">https://www.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_HowTo.html</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to create a “Hello World” console application using .NET Core without Visual Studio?</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/how-to-create-a-hello-world-console-application-using-net-core-without-visual-studio</link>
      <pubDate>Fri, 27 Nov 2015 11:20:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2015/11/27/how-to-create-a-hello-world-console-application-using-net-core-without-visual-studio/</guid>
      <description><![CDATA[This article gives you a quick guidance on how to create a console application using .NET Core...]]></description>
      <content:encoded><![CDATA[<p>This article gives you a quick guidance on how to create a console application using .NET Core without any IDE like Visual Studio.</p>
<p><strong>Refer</strong>: <a href="https://blogs.msdn.com/b/manjug/archive/2015/11/28/fundamentals-to-net-core-5.aspx">Previous article</a> to get to know bit fundamentals of .NET Core 5</p>
<p><strong>Step 1: Install DNVM using powershell command</strong></p>
<p>Open command prompt in admin mode and run the following:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&amp;{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Step 2: Install the requested DNX version from the feed</strong></p>
<p>In my below example runtime coreclr of version 1.0.0-rc1-final</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>dnvm install -a x64 -r coreclr 1.0.0-rc1-final</p>
<p>dnvm install -a x64 -r coreclr 1.0.0-rc1-final&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 3: List the DNX version installed</strong></p>
<p>dnvm list</p>
<p>This should show the DNX version installed and active one selected.</p>
<p>&nbsp;</p>
<p><strong>Step 4: Write to Console App to display &ldquo;Hello World&rdquo;</strong></p>
<p>Here is simple code to display &ldquo;Hello World&rdquo;, you can copy paste below code into Program.cs file under your application directory.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p style="padding-left: 30px;"><span style="font-size: small;">using System;</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">public class Program</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">{</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">&nbsp;&nbsp;&nbsp; public static void Main (string[] args)</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">&nbsp;&nbsp;&nbsp; {</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("Hello World");</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">&nbsp;&nbsp;&nbsp; }</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;">}</span></p>
</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong></p>
<p><strong>Step 5: Create a project.json file</strong></p>
<p>We need to have a project.json file to retrieve the dependencies and configuring the references/dependencies for the project. It also determines the runtime which can execute the project.</p>
<p>Copy the below code into project.json file under your application directory.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p style="padding-left: 30px;">{</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; "version": "1.0.0-*",</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; "dependencies": {</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; },</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; "frameworks" : {</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "dnx451" : { },</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "dnxcore50" : {</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "dependencies": {</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "System.Console": "4.0.0-beta-*"</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">}&nbsp;</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>Step 6: Run the .NET Utilities command</strong></p>
<p>.NET utilities(DNU) manages the required packages to run an application and dependencies by installing and restoring the packages for the respective project files.</p>
<p>From the same command prompt windows where we ran the list command, navigate to the application directory folder and run below commands:&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;dnu restore</p>
</td>
</tr>
</tbody>
</table>
<p>Now run your application by running below command:&nbsp;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>&nbsp;dnx run</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;This would display &ldquo;Hello World&rdquo; in your window.</p>]]></content:encoded>
    </item>
    <item>
      <title>Fundamentals to .NET Core 5</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/fundamentals-to-net-core-5</link>
      <pubDate>Fri, 27 Nov 2015 10:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2015/11/27/fundamentals-to-net-core-5/</guid>
      <description><![CDATA[&nbsp;
To understand .NET Core 5 we should be familiar with below terms:

DNVM &ndash; .NET...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;</p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">To understand .NET Core 5 we should be familiar with below terms:</span></span></p>
<ul>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM &ndash; .NET Version Manager is a command line tool to configure .NET runtime.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNU &ndash; .NET Utilities is a command line utility to install and manage library packages.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNX &ndash; .NET Execution Environment is a runtime which includes components to run .NET applications for Windows, Mac and Linux.</span></span><span style="line-height: 12pt; text-indent: -0.25in;">&nbsp;</span></li>
</ul>
<div style="text-indent: -24px;"><span style="line-height: 16px;"><br /></span></div>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">.NET Core 5 cool features:</span></span></strong></p>
<ul>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">.NET Core 5 supports cross-platform development on Windows, Mac and Linux.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">Ability to host on IIS or self-host in your own process.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">We do not have any web.config/app.config settings for ASP.NET applications.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">There is no packages.config.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">There is no global.asax.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">We have project.json, which contains your project metadata, project dependencies and which framework you want the build to run.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">There is no System.Web.DLL.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">.NET Core 5 is open source and available in GitHub.</span></span></li>
<li><span style="font-family: Calibri;"><span style="font-size: 11pt;">.NET Core 5 is available entirely as NuGet packages.</span></span><span style="line-height: 12pt;">&nbsp;</span></li>
</ul>
<div><span style="line-height: 16px;"><br /></span></div>
<div>
<p><strong>Let&rsquo;s start with installing DNVM:</strong></p>
<p>Open command prompt in admin mode and run the following:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="623">
<p>@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&amp;{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"&nbsp;</p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;</p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;<span style="font-size: 11pt; font-family: Calibri; line-height: 12pt;">Once you run the above command then you should be able to run &ldquo;dnvm list&rdquo; command, however the output would return no result for now.</span></p>
<ul>
<li><span style="line-height: 12pt;">&nbsp;</span><span style="line-height: 12pt; font-size: 11pt; font-family: Calibri;">DNVM command to install DNX for .NET Core:</span></li>
</ul>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;<span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnvm upgrade -r coreclr</span></p>
<ul>
<li><span style="line-height: 12pt; text-indent: -0.25in;">&nbsp;</span><span style="line-height: 12pt; text-indent: -0.25in; font-family: Calibri; font-size: 11pt;">DNVM Command to install DNX for .NET Framework:</span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm upgrade -r clr</span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to install default DNX:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm upgrade</span></p>
<p><span style="font-size: 11pt; font-family: Calibri; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; By default, DNVM will install DNX for the full .NET Framework if no runtime is specified.</span></p>
<ul>
<li><span style="font-family: Calibri;"><span style="font-size: 14.6667px; line-height: 16px;"><span>DNVM Command For 64 bit:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm upgrade -a x64</span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to Install DNX for .NET Core:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm upgrade -a x64 -r coreclr</span><br /><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm upgrade -a x86 -r coreclr</span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to install specific version of DNX:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.5in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm install -a x86 -r coreclr 1.0.0-rc1-final</span></p>
<ul>
<li><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: -0.25in;">DNVM command to list the DNX versions installed:</span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.25in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm list</span></p>
<p><span style="font-size: 11pt; font-family: Calibri; line-height: 12pt; text-indent: 0.25in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Example of how it looks</span></p>
<p>&nbsp;</p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt 0.25in; line-height: 12pt; text-indent: 0.25in;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/7433.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/7433.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/58/29/7433.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-58-29/7433.1.png" alt="" border="0" /></a></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt 0.25in; line-height: 12pt; text-indent: 0.25in;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">In above screen shot Active columns shows which version is picked by DNX.</span></span></span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to change the runtime version to any specific version and architecture:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.25in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm use -a x64 -r coreclr 1.0.0-rc1-final</span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to display the named alias:</span></span></span></li>
</ul>
<p><span style="font-family: Calibri; font-size: 11pt; line-height: 12pt; text-indent: 0.25in;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm alias &lt;alias&gt;</span></p>
<ul>
<li><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt;">DNVM command to set alias to specific version:</span></span></span></li>
</ul>
<p><span style="font-size: 11pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dnvm alias &lt;alias&gt; -a x64 -r coreclr 1.0.0-rc1-final</span><span style="mso-tab-count: 1;"><span style="font-size: 11pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></span></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><strong style="mso-bidi-font-weight: normal;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">&nbsp;</span></span></span></strong></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><strong style="mso-bidi-font-weight: normal;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">DNU- .NET Utilities</span></span></span></strong></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">DNU is a part of DNX SDK which manages the required packages to run an application and dependencies by installing and restoring the packages for the respective project files. For simplicity we can say it&rsquo;s similar to command line package manager in Visual Studio.</span></span></span></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;</p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><strong style="mso-bidi-font-weight: normal;"><span lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Project.Json</span></span></span></strong></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">.NET Core 5 application contains project.json file where DNU reads this file to retrieve the dependencies and configuring the references/dependencies for the project. It also determines the runtime which can execute the project.</span></span></span></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Basically DNU reads the project.json, retrieves and installs the relevant packages to build the project. This runtime which is executed by DNX is based on the commands specified in project.json with the selected version of DNX set by DNVM.</span></span></span></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;">&nbsp;</p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="mso-ansi-language: en;" lang="EN"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Using all the above command let&rsquo;s see how to create a &ldquo;Hello World&rdquo; using .NET Core console application without Visual Studio in <a href="https://blogs.msdn.com/b/manjug/archive/2015/11/28/how-to-create-a-hello-world-console-application-using-net-core-without-visual-studio.aspx">next</a>&nbsp;article.</span></span></span></p>
<p class="MsoNormal" style="list-style-type: disc; margin: 0in 0in 8pt; line-height: 12pt;"><span style="mso-ansi-language: en;" lang="EN">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Workaround for outbound rewriting can be used together with IIS dynamic compression</title>
      <link>https://docs.microsoft.com/archive/blogs/manjug/workaround-for-outbound-rewriting-can-be-used-together-with-iis-dynamic-compression</link>
      <pubDate>Sat, 12 Jul 2014 10:57:00 GMT</pubDate>
      <dc:creator><![CDATA[Manjunath Gururaja]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/manjug/2014/07/12/workaround-for-outbound-rewriting-can-be-used-together-with-iis-dynamic-compression/</guid>
      <description><![CDATA[&nbsp;
I had a customer where he had IIS Dynamic compression enabled with outbound URL rewriting...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>I had a customer where he had IIS Dynamic compression enabled with outbound URL rewriting and we used to get 500.52 error when browsing the application.</p>
<p>We identified that we cannot have outbound rule working with dynamic compression enabled by default IIS settings.</p>
<p>The work around for Dynamic compression and outbound URL rewrite to work together is as below:</p>
<ul>
<li>Adding <strong>LogRewrittenUrlEnabled</strong> registry key under <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite</strong> to 0 or by running below command line: &ldquo;reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0&rdquo;</li>
<li>Set the <strong>dynamicCompressionBeforeCache</strong> property to false for /system.webServer/urlCompression configuration element. Can be done from adding in web.config as below</li>
</ul>
<blockquote>
<p>&lt;urlCompression doStaticCompression=&rdquo;false&rdquo; doDynamicCompression=&rdquo;true&rdquo; <strong>dynamicCompressionBeforeCache=&rdquo;false&rdquo;</strong> /&gt;</p>
</blockquote>
<blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OR</p>
<p>By running the below command from command prompt</p>
</blockquote>
<blockquote>
<p>appcmd.exe set config "WEBSITENAME" -section:system.webServer/urlCompression /<strong>dynamicCompressionBeforeCache:"False"</strong></p>
</blockquote>
<ul>
<li>Re-arrange the IIS modules to have URL Rewrite module (RewriteModule) to run before Dynamic Compression module (DynamicCompressionModule). In IIS manager under Modules section, click on View ordered List and make sure that DynamicCompressionModule is above RewriteModule.</li>
<li>Restart IIS.</li>
</ul>
<p>We had another scenario where my application pool was running under 32 bit on a 64 bit machine i.e. Enable 32-Bit Applications was set to true for my application pool setting and after running process monitor found out that <strong>LogRewrittenUrlEnabled</strong> registry key was expected in below location.</p>
<p><strong>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Microsoft\Inetstp\Rewrite</strong>.</p>
<p>Workaround for Dynamic compression and outbound URL rewrite to work together for a 32-bit enabled application on a 64 bit machine is to have:</p>
<ul>
<li>Adding <strong>LogRewrittenUrlEnabled</strong> registry key under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Microsoft\Inetstp\Rewrite to 0 or by running below command line: &ldquo;reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\Microsoft\Inetstp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0&rdquo;</li>
<li>Set the <strong>dynamicCompressionBeforeCache</strong> property to false for /system.webServer/urlCompression configuration element. Can be done from adding in web.config as below</li>
</ul>
<blockquote>
<p>&lt;urlCompression doStaticCompression=&rdquo;false&rdquo; doDynamicCompression=&rdquo;true&rdquo; <strong>dynamicCompressionBeforeCache=&rdquo;false&rdquo;</strong> /&gt;</p>
</blockquote>
<blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OR</p>
</blockquote>
<blockquote>
<p>By running the below command from command prompt</p>
</blockquote>
<blockquote>
<p>appcmd.exe set config "WEBSITENAME" -section:system.webServer/urlCompression /<strong>dynamicCompressionBeforeCache:"False"</strong></p>
</blockquote>
<ul>
<li>Re-arrange the IIS modules to have URL Rewrite module (RewriteModule) to run before Dynamic Compression module (DynamicCompressionModule). In IIS manager under Modules section, click on View ordered List and make sure that DynamicCompressionModule is above RewriteModule.</li>
<li>Restart IIS.</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>