<?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>My Experiences</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/pkumark/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/pkumark/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:42:57 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Migrating websites from IIS6 to IIS7</title>
      <link>https://docs.microsoft.com/archive/blogs/pkumark/migrating-websites-from-iis6-to-iis7</link>
      <pubDate>Sun, 06 Jun 2010 12:43:00 GMT</pubDate>
      <dc:creator><![CDATA[PraveenKumarK]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pkumark/2010/06/06/migrating-websites-from-iis6-to-iis7/</guid>
      <description><![CDATA[Many of the websites today are hosted on IIS 6.0 and the teams are migrating them to IIS 7.0 on a...]]></description>
      <content:encoded><![CDATA[<p>Many of the websites today are hosted on IIS 6.0 and the teams are migrating them to IIS 7.0 on a Windows Server 2008 platform. Microsoft Web Deployment tool is the perfect solution for these kinds of website migrations. The Web Deployment Tool simplifies the migration, management and deployment of IIS Web servers, Web applications and Web sites. Administrators can use command-line scripting with the Web Deployment Tool to synchronize IIS 6.0 and IIS 7.0 servers or to migrate an IIS 6.0 server to IIS 7.0. The Web Deployment Tool also enables administrators and delegated users to use IIS Manager to deploy ASP.NET and PHP applications to an IIS 7.0 server.</p>
<p>IIS7 replaces the aging metabase with a more convenient applicationHost.config which stores the configuration in XML.</p>
<p><strong><span style="text-decoration: underline;">Tool Download Location:</span></strong></p>
<table cellpadding="7" cellspacing="0" border="1" dir="ltr" style="width: 796px; height: 85px;">
<tbody>
<tr>
<td valign="top" height="48"><b><span style="font-size: small;"><b><span style="font-size: small;">
<p>64 Bit: <a href="https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=2c3b55b7-8bad-4f92-86c2-c3758237ab70">https://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=2c3b55b7-8bad-4f92-86c2-c3758237ab70</a></p>
</span></b></span>
<p>&nbsp;<b><span style="font-size: small;"><b><span style="font-size: small;">32 Bit (X86):&nbsp;&nbsp; <a href="https://www.microsoft.com/downloads/details.aspx?familyid=32A781A2-4961-49FC-B34D-170BFA78414F&amp;displaylang=en">https://www.microsoft.com/downloads/details.aspx?familyid=32A781A2-4961-49FC-B34D-170BFA78414F&amp;displaylang=en</a></span></b></span></b></p>
</b></td>
</tr>
</tbody>
</table>
<p>Below are the detailed steps to migrate websites from an IIS6 hosting to IIS7 host:</p>
<p><strong><span style="text-decoration: underline;">Install MS Deploy on the Source IIS6 Server:</span></strong></p>
<ul>
<li>You must have .NET Framework 2.0 SP1 or 3.5 installed on the server. </li>
<li>Download the filefrom the download location and run it on source server. Choose Setup Type: Typical. Be sure to use the x64 version if you have Windows 2003 x64. There is no entry in the Start Menu; you need to start the program through the command prompt. C:\Program Files\Microsoft Web Deploy\msdeploy followed by the command.</li>
</ul>
<p><strong><span style="text-decoration: underline;"></span></strong>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Installing MS Deploy on the Destination IIS7 Server:</span></strong></p>
<ul>
<li>Same as above. Be sure to use the x64 version if you have Windows 2008 x64.</li>
</ul>
<p><strong><span style="text-decoration: underline;"></span></strong>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Create a Backup of the IIS7 configuration:</span></strong></p>
<p>It is important to create a backup of the IIS7 configuration before you start. You never know when you&rsquo;ll make a mistake, and restoring IIS to the default configuration without a backup isn&rsquo;t fun. IIS7 comes with the appcmd.exe command line tool, which is new for IIS7, and simplifies configuration backups immensely. It is located in the %windir%\system32\inetsrv\ folder, which isn&rsquo;t in the path variables, so you&rsquo;ll need to navigate to that path with the command prompt first.</p>
<ul>
<li>Click Start -&gt; Run -&gt; type &ldquo;cmd&rdquo; and press OK.</li>
<li>At the command prompt, navigate to the %windir%\system32\inetsrv\ folder. (type &ldquo;cd \&rdquo; and then &ldquo;cd C:\Windows\system32\inetsrv&rdquo; if windows is in the default path)</li>
<li>Once in the target directory, type: appcmd add backup &ldquo;BackupPreMigrate&rdquo;</li>
<li>Press Enter. All done.</li>
<li>To display a list of previous backups type: appcmd list backup</li>
<li>To restore a backup, type: appcmd restore backup &ldquo;BackupPreMigrate&rdquo;</li>
</ul>
<p><strong><span style="text-decoration: underline;"></span></strong>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Verify Dependencies on Source IIS6 Server:</span></strong></p>
<p>At the command prompt (In the C:\Program Files\IIS\Microsoft Web Deploy), type: msdeploy &ndash;verb:getDependencies &ndash;source:metakey=lm/w3svc/&lt;#site Identifier&gt; Where #site Identifier = Website number which you want to migrate (eg: 1 = Default Website, 2= Administration, 3 = Application1, etc..)</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Installing Required Components on Destination IIS7 Server:</span></strong></p>
<p>From the dependency list you can determine which roles need to be installed on the destination IIS7 Server. Any dependencies listed in the XML file that is saved during the migration will need to be installed on the destination server or else the migration will not complete. You can remove dependencies beforehand or from within the XML file found in the backup directory after the sync command.</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">Migrate Website:</span></strong></p>
<ul>
<li>On the source IIS6 Server, type <em><strong>msdeploy -verb:sync -source:metakey=lm/w3svc/#siteidentifier -dest:archivedir=c:\backup_sitename</strong></em> </li>
<li>Move the backup folder (c:\backup_sitename) to the destination server, or if on a network simply backup to the final destination on the IIS7 server or SAN. </li>
<li>On the destination IIS7 Server, type <strong><em>msdeploy -verb:migrate -source:archivedir=c:\backup_sitename -dest:metakey=lm/w3svc/# siteidentifier</em></strong></li>
</ul>
<p><strong><span style="text-decoration: underline;"></span></strong></p>
<p><strong><span style="text-decoration: underline;">Post Migration:</span></strong></p>
<p>After the migration is complete, some elements will need to be re-configured. PHP, ASP.NET Ajax and others will need to be configured independently of the IIS migration to match the source server&rsquo;s settings.</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;">References:</span></strong></p>
<p><a href="https://technet.microsoft.com/en-us/library/dd569024(WS.10).aspx">https://technet.microsoft.com/en-us/library/dd569024(WS.10).aspx</a> <br /><a href="https://www.iis.net/extensions/WebDeploymentTool">https://www.iis.net/extensions/WebDeploymentTool</a></p>
<p><strong><span style="text-decoration: underline;"></span></strong>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Migrating IIS7 from System Drive to a Non-System Drive</title>
      <link>https://docs.microsoft.com/archive/blogs/pkumark/migrating-iis7-from-system-drive-to-a-non-system-drive</link>
      <pubDate>Sat, 15 May 2010 00:19:00 GMT</pubDate>
      <dc:creator><![CDATA[PraveenKumarK]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/pkumark/2010/05/15/migrating-iis7-from-system-drive-to-a-non-system-drive/</guid>
      <description><![CDATA[As most of you know, IIS is by default installed on C$ in Windows Server 2008 and there is no way to...]]></description>
      <content:encoded><![CDATA[<P>As most of you know, IIS is by default installed on C$ in Windows Server 2008 and there is no way to install it on any other drives. The only solution is to migrate it to a different drive is post installation.</P>
<P>Recently i had a situation where the IIS was installed on C$ of a fully functional web&nbsp;server. During the server security review, we had to migrate it to a non-system drive (D$ in our case). It is a security best practice to have the IIS installed on a non-system drive. As the server was in production and we could not afford much downtime on the server, we had to figure out a way to migrate IIS from C$ to D$ with minimal impact and least downtime.</P>
<P>The APPCMD&nbsp;of the Windows Server 2008 is a fantastic utility which helps this migration without much hassles. Migrating IIS from C$ to D$ will include some data migration, log migration, registry key modifications etc.. Writing a batch file to automate this entire migration was the best possible solution and guess what, we found the same from one of the IIS <A title="IIS blogs" href="https://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx" target=_blank mce_href="https://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx">blogs</A>&nbsp;which works like magic:</P>
<P><EM>REM-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</EM></P>
<P><EM>REM PLEASE BE AWARE: SERVICING (I.E. HOTFIXES AND SERVICE PACKS) WILL STILL REPLACE FILES <BR>REM IN THE ORIGINAL DIRECTORIES. THE LIKELIHOOD THAT FILES IN THE INETPUB DIRECTORIES HAVE <BR>REM TO BE REPLACED BY SERVICING IS LOW BUT FOR THIS REASON DELETING THE ORIGINAL DIRECTORIES<BR>REM IS NOT POSSIBLE. </EM></P>
<P><EM>@echo off<BR>IF "%1" == "" goto err<BR>setlocal<BR>set MOVETO=%1:\</EM></P>
<P><EM>REM simple error handling if drive does not exist or argument is wrong <BR>IF NOT EXIST %MOVETO% goto err</EM></P>
<P><EM>REM Backup IIS config before we start changing config to point to the new path<BR>%windir%\system32\inetsrv\appcmd add backup beforeRootMove</EM></P>
<P><BR><EM>REM Stop all IIS services<BR>iisreset /stop</EM></P>
<P><EM>REM Copy all content <BR>REM /O - copy ACLs<BR>REM /E - copy sub directories including empty ones<BR>REM /I - assume destination is a directory<BR>REM /Q - quiet</EM></P>
<P><EM>REM echo on, because user will be prompted if content already exists.<BR>echo on<BR>xcopy %systemdrive%\inetpub %MOVETO%inetpub /O /E /I /Q<BR>@echo off<BR>REM Move AppPool isolation directory <BR>reg add HKLM\System\CurrentControlSet\Services\WAS\Parameters /v ConfigIsolationPath /t REG_SZ /d %MOVETO%inetpub\temp\appPools /f</EM></P>
<P><EM>REM Move logfile directories<BR>%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.traceFailedRequestsLogging.directory:"%MOVETO%inetpub\logs\FailedReqLogFiles"<BR>%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.logfile.directory:"%MOVETO%inetpub\logs\logfiles"<BR>%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/log -centralBinaryLogFile.directory:"%MOVETO%inetpub\logs\logfiles"<BR>%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/log -centralW3CLogFile.directory:"%MOVETO%inetpub\logs\logfiles"</EM></P>
<P><EM>REM Move config history location, temporary files, the path for the Default Web Site and the custom error locations<BR>%windir%\system32\inetsrv\appcmd set config -section:system.applicationhost/configHistory -path:%MOVETO%inetpub\history<BR>%windir%\system32\inetsrv\appcmd set config -section:system.webServer/asp -cache.disktemplateCacheDirectory:"%MOVETO%inetpub\temp\ASP Compiled Templates"<BR>%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression -directory:"%MOVETO%inetpub\temp\IIS Temporary Compressed Files"<BR>%windir%\system32\inetsrv\appcmd set vdir "Default Web Site/" -physicalPath:%MOVETO%inetpub\wwwroot<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='401'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='403'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='404'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='405'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='406'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='412'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='500'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='501'].prefixLanguageFilePath:%MOVETO%inetpub\custerr<BR>%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='502'].prefixLanguageFilePath:%MOVETO%inetpub\custerr</EM></P>
<P><EM>REM Make sure Service Pack and Hotfix Installers know where the IIS root directories are<BR>reg add HKLM\Software\Microsoft\inetstp /v PathWWWRoot /t REG_SZ /d %mOVETO%\inetpub\wwwroot /f <BR>reg add HKLM\Software\Microsoft\inetstp /v PathFTPRoot /t REG_SZ /d %MOVETO%\inetpub\ftproot /f<BR>REM Do the same for x64 directories<BR>if not "%ProgramFiles(x86)%" == "" reg add HKLM\Software\Wow6432Node\Microsoft\inetstp /v PathWWWRoot /t REG_EXPAND_SZ /d %MOVETO%inetpub\wwwroot /f <BR>if not "%ProgramFiles(x86)%" == "" reg add HKLM\Software\Wow6432Node\Microsoft\inetstp /v PathFTPRoot /t REG_EXPAND_SZ /d %MOVETO%inetpub\ftproot /f</EM></P>
<P><EM>REM Restart all IIS services<BR>iisreset /start<BR>echo.<BR>echo.<BR>echo ===============================================================================<BR>echo Moved IIS7 root directory from %systemdrive%\ to %MOVETO%.<BR>echo.<BR>echo Please verify if the move worked. If so you can delete the %systemdrive%\inetpub directory.<BR>echo If something went wrong you can restore the old settings via <BR>echo&nbsp;&nbsp;&nbsp;&nbsp; "APPCMD restore backup beforeRootMove" <BR>echo and <BR>echo&nbsp;&nbsp;&nbsp;&nbsp; "REG delete HKLM\System\CurrentControlSet\Services\WAS\Parameters\ConfigIsolationPath"<BR>echo You also have to reset the PathWWWRoot and PathFTPRoot registry values<BR>echo in HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp.<BR>echo ===============================================================================<BR>echo.<BR>echo.<BR>endlocal<BR>goto success</EM></P>
<P><EM>REM error message if no argument or drive does not exist<BR>:err<BR>echo. <BR>echo New root drive letter required. <BR>echo Here an example how to move the IIS root to the F:\ drive:<BR>echo. <BR>echo MOVEIISROOT.BAT F<BR>echo.<BR>echo. </EM></P>
<P><EM>:success</EM></P>
<P mce_keep="true"><EM>REM----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</EM></P>
<P mce_keep="true">Just copy the above code and save it a .BAT file (eg: MoveIISROOT.bat). Run this command on the server on which the IIS has to be migrated to a non-system drive. Syntx for the command as follows (MoveIISRoot.bat &lt;Destination Drive&gt;):</P>
<P mce_keep="true">D:\&gt;MoveIISRoot.bat D</P>
<P mce_keep="true">Here D$ will be the new drive on which the IIS will be migrated. The above script will take care of migrating the data (folders), logs and does the configuration changes (registry keys, system cofig etc...)</P>
<P mce_keep="true">So, go ahead and use the script to migrate IIS (inetpub and its contents) to any drive on your web server.</P>
<P mce_keep="true">"Happy Migrating :-) "</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">Note: Please restart IIS post migration and also check your websites if they are pointing to the right web folders (if not, update the web folder location. This shouldnt cause any issues as such).</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>