{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/comments/53215809","id":53215809,"diff_hunk":"@@ -1,8 +1,149 @@\n-.. include:: /../common/stub-topic.txt\n+.. _nano-server:\n+\n+ASP.NET 5 on Nano Server\n+========================\n+\n+By `Sourabh Shirhatti`\n+\n+.. attention:: This tutorial uses a pre-lease version of the Nano Server installation option of Windows Server Technical Preview 4. You may use the software in the virtual hard disk image only to internally demonstrate and evaluate it. You may not use the software in a live operating environment. Please see https://go.microsoft.com/fwlink/?LinkId=624232 for specific information about the end date for the preview.\n+\n+In this tutorial, you'll take an existing ASP.NET 5 application and deploy it to a Nano Server instance running IIS.\n+\n+.. contents:: Sections:\n+  :local:\n+  :depth: 1\n+\n+Introduction\n+------------\n+\n+Nano Server is a new version of Windows Server with a small footprint optimized for the cloud. You can learn more about Nano Server from the official docs `available here <https://msdn.microsoft.com/en-us/library/mt126167.aspx>`_.\n+\n+In this tutorial, we will using a pre-built Virtual Hard Disk (VHD) for Nano Server which can be downloaded `here <https://msdn.microsoft.com/en-us/virtualization/windowscontainers/nano_eula>`_. This pre-built VHD already includes the Reverse Forwarders and IIS packages which are required for this tutorial.\n+\n+Before proceeding with this tutorial, you will require the published output of an existing ASP.NET 5 application. Refer to the guidance on :ref:`dnu-publish`. Ensure your application is built targeting the **64-bit** version of ``coreclr``.\n+\n+Setting up the Nano Server Instance\n+-----------------------------------\n+\n+Create a new Virtual Machine using Hyper-V on your development machine using the previously downloaded VHD. The machine will require you to set an administator password before logging on. At the VM console, press F11 to set the password before the first logon.\n+\n+After setting the local password, you will manage Nano Server using the management tools remotely.\n+\n+Connecting to your Nano Server Instance using PowerShell Remote\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Open an elevated PowerShell window to add your remote Nano Server instance to your ``TrustedHosts`` list.\n+\n+.. code:: ps1\n+\n+  $ip = \"10.83.181.14\" # replace with the correct IP address\n+  Set-Item WSMan:\\localhost\\Client\\TrustedHosts \"$ip\" -Force\n+\n+Once you have added your Nano Server instance to your ``TrustedHosts``, you can connect to it using PowerShell Remote session\n+\n+.. code:: ps1\n+\n+  $ip = \"10.83.181.14\" # replace with the correct IP address\n+  $s = New-PSSession -ComputerName $ip -Credential ~\\Administrator\n+  Enter-PSSession $s\n+\n+If you have successfully connected using PSRemote, you prompt will look like this ``[10.83.181.14]: PS C:\\Users\\Administrator\\Documents>``\n+\n+Installing the HTTPPlatformHandler Module\n+-----------------------------------------\n+\n+At the moment, the process to install the HTTPPlatformHandler Module for IIS is manual. You will need to install the latest 64-bit version of the `HttpPlatformHandler <http://www.iis.net/downloads/microsoft/httpplatformhandler>`_ on a regular (not Nano) machine. After installing you will need to copy the following files:\n+\n+* *%windir%\\\\System32\\\\inetsrv\\\\httpPlatformHandler.dll*\n+* *%windir%\\\\System32\\\\inetsrv\\\\config\\\\schema\\\\httpplatform_schema.xml*\n+\n+On the Nano machine you’ll need to copy those two files to their respective locations.\n+\n+.. code:: ps1\n+\n+  Copy-Item .\\httpPlatformHandler.dll c:\\Windows\\System32\\inetsrv\n+  Copy-Item .\\httpplatform_schema.xml c:\\Windows\\System32\\inetsrv\\config\\schema\n+\n+Enabling the HTTPPlatformHandler\n+--------------------------------\n+\n+You can execute the following PowerShell script in a remote PowerShell session to enable the HTTPPlatformHandler module on the Nano server.\n+\n+.. note:: This script runs on a clean system, but is not meant to be idempotent. If you run this multiple times it will add multiple entries. If you end up in a bad state, you can find backups of the *applicationHost.config* file at *%systemdrive%\\inetpub\\history*.\n+\n+.. literalinclude:: nano-server/enable-platformhandler.ps1\n+  :language: ps1\n+\n+Manually Editing *applicationHost.config*\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+You can skip this section if you already ran the PowerShell script above. Though is not recommended, you can also enable the HTTPPlatformHandler by manually editing the *applicationHost.config* file.\n+\n+Open up *C:\\\\Windows\\\\System32\\\\inetsrv\\\\config\\\\applicationHost.config*\n+\n+Under ``<configSections>`` add\n+\n+.. literalinclude:: nano-server/applicationHost.config","path":"aspnet/tutorials/nano-server.rst","position":87,"original_position":87,"commit_id":"becfbb2ad4fc471c280d44b099908ade3b56df98","original_commit_id":"becfbb2ad4fc471c280d44b099908ade3b56df98","user":{"login":"danroth27","id":1874516,"avatar_url":"https://avatars.githubusercontent.com/u/1874516?v=3","gravatar_id":"","url":"https://api.github.com/users/danroth27","html_url":"https://github.com/danroth27","followers_url":"https://api.github.com/users/danroth27/followers","following_url":"https://api.github.com/users/danroth27/following{/other_user}","gists_url":"https://api.github.com/users/danroth27/gists{/gist_id}","starred_url":"https://api.github.com/users/danroth27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danroth27/subscriptions","organizations_url":"https://api.github.com/users/danroth27/orgs","repos_url":"https://api.github.com/users/danroth27/repos","events_url":"https://api.github.com/users/danroth27/events{/privacy}","received_events_url":"https://api.github.com/users/danroth27/received_events","type":"User","site_admin":false},"body":"dedent","created_at":"2016-02-17T19:19:16Z","updated_at":"2016-02-17T19:19:16Z","html_url":"https://github.com/aspnet/Docs/pull/993#discussion_r53215809","pull_request_url":"https://api.github.com/repos/aspnet/Docs/pulls/993","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments/53215809"},"html":{"href":"https://github.com/aspnet/Docs/pull/993#discussion_r53215809"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/993"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/993","id":59575316,"html_url":"https://github.com/aspnet/Docs/pull/993","diff_url":"https://github.com/aspnet/Docs/pull/993.diff","patch_url":"https://github.com/aspnet/Docs/pull/993.patch","issue_url":"https://api.github.com/repos/aspnet/Docs/issues/993","number":993,"state":"open","locked":false,"title":"Nano Server tutorial","user":{"login":"shirhatti","id":4734691,"avatar_url":"https://avatars.githubusercontent.com/u/4734691?v=3","gravatar_id":"","url":"https://api.github.com/users/shirhatti","html_url":"https://github.com/shirhatti","followers_url":"https://api.github.com/users/shirhatti/followers","following_url":"https://api.github.com/users/shirhatti/following{/other_user}","gists_url":"https://api.github.com/users/shirhatti/gists{/gist_id}","starred_url":"https://api.github.com/users/shirhatti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shirhatti/subscriptions","organizations_url":"https://api.github.com/users/shirhatti/orgs","repos_url":"https://api.github.com/users/shirhatti/repos","events_url":"https://api.github.com/users/shirhatti/events{/privacy}","received_events_url":"https://api.github.com/users/shirhatti/received_events","type":"User","site_admin":false},"body":"@danroth27 Still needs work on the language, but I want you to have an initial look and see if I captured what you wanted.\r\n\r\n","created_at":"2016-02-16T23:57:02Z","updated_at":"2016-02-17T19:19:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b2d11c2195d6fd72dfac606848c0db5e374866f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Docs/pulls/993/commits","review_comments_url":"https://api.github.com/repos/aspnet/Docs/pulls/993/comments","review_comment_url":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Docs/issues/993/comments","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/becfbb2ad4fc471c280d44b099908ade3b56df98","head":{"label":"aspnet:shirhatti/nano-server","ref":"shirhatti/nano-server","sha":"becfbb2ad4fc471c280d44b099908ade3b56df98","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28239455,"name":"Docs","full_name":"aspnet/Docs","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Docs","description":"Documentation for ASP.NET 5","fork":false,"url":"https://api.github.com/repos/aspnet/Docs","forks_url":"https://api.github.com/repos/aspnet/Docs/forks","keys_url":"https://api.github.com/repos/aspnet/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Docs/teams","hooks_url":"https://api.github.com/repos/aspnet/Docs/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Docs/events","assignees_url":"https://api.github.com/repos/aspnet/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Docs/tags","blobs_url":"https://api.github.com/repos/aspnet/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Docs/languages","stargazers_url":"https://api.github.com/repos/aspnet/Docs/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Docs/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Docs/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Docs/subscription","commits_url":"https://api.github.com/repos/aspnet/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Docs/merges","archive_url":"https://api.github.com/repos/aspnet/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Docs/downloads","issues_url":"https://api.github.com/repos/aspnet/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Docs/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Docs/deployments","created_at":"2014-12-19T17:38:02Z","updated_at":"2016-02-16T07:29:17Z","pushed_at":"2016-02-17T17:17:27Z","git_url":"git://github.com/aspnet/Docs.git","ssh_url":"git@github.com:aspnet/Docs.git","clone_url":"https://github.com/aspnet/Docs.git","svn_url":"https://github.com/aspnet/Docs","homepage":null,"size":41076,"stargazers_count":383,"watchers_count":383,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":618,"mirror_url":null,"open_issues_count":135,"forks":618,"open_issues":135,"watchers":383,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"6846f3da4681961d5594a12b5a39b37e414f3ce8","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28239455,"name":"Docs","full_name":"aspnet/Docs","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Docs","description":"Documentation for ASP.NET 5","fork":false,"url":"https://api.github.com/repos/aspnet/Docs","forks_url":"https://api.github.com/repos/aspnet/Docs/forks","keys_url":"https://api.github.com/repos/aspnet/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Docs/teams","hooks_url":"https://api.github.com/repos/aspnet/Docs/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Docs/events","assignees_url":"https://api.github.com/repos/aspnet/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Docs/tags","blobs_url":"https://api.github.com/repos/aspnet/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Docs/languages","stargazers_url":"https://api.github.com/repos/aspnet/Docs/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Docs/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Docs/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Docs/subscription","commits_url":"https://api.github.com/repos/aspnet/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Docs/merges","archive_url":"https://api.github.com/repos/aspnet/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Docs/downloads","issues_url":"https://api.github.com/repos/aspnet/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Docs/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Docs/deployments","created_at":"2014-12-19T17:38:02Z","updated_at":"2016-02-16T07:29:17Z","pushed_at":"2016-02-17T17:17:27Z","git_url":"git://github.com/aspnet/Docs.git","ssh_url":"git@github.com:aspnet/Docs.git","clone_url":"https://github.com/aspnet/Docs.git","svn_url":"https://github.com/aspnet/Docs","homepage":null,"size":41076,"stargazers_count":383,"watchers_count":383,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":618,"mirror_url":null,"open_issues_count":135,"forks":618,"open_issues":135,"watchers":383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/993"},"html":{"href":"https://github.com/aspnet/Docs/pull/993"},"issue":{"href":"https://api.github.com/repos/aspnet/Docs/issues/993"},"comments":{"href":"https://api.github.com/repos/aspnet/Docs/issues/993/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/993/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/993/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Docs/statuses/becfbb2ad4fc471c280d44b099908ade3b56df98"}}}}