<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>daGrind &#187; Windows</title>
	<atom:link href="http://dagrind.com/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://dagrind.com</link>
	<description>Technologically Unchallenged</description>
	<lastBuildDate>Tue, 13 Dec 2011 21:10:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>DPAPI</title>
		<link>http://dagrind.com/2010/02/10/dpapi/</link>
		<comments>http://dagrind.com/2010/02/10/dpapi/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 13:43:44 +0000</pubDate>
		<dc:creator>Todd Casey</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DPAPI]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dagrind.com/?p=242</guid>
		<description><![CDATA[I wrote this documentation and project years ago and found it while looking through some of my archives last night. It probably still has some millage left and might be found useful to someone setting up DPAPI. You can download the binaries or source code below. Download Binaries &#124; Source DPAPI Setup 1. Create the [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this documentation and project years ago and found it while looking through some of my archives last night. It probably still has some millage left and might be found useful to someone setting up DPAPI. You can download the binaries or source code below.</p>
<p>Download <a title="DPAPI Binaries" href="http://dagrind.com/files/2010/02/DPAPIBinaries.zip">Binaries</a> | <a title="DPAPI Source" href="http://dagrind.com/files/2010/02/DPAPISource.zip">Source</a></p>
<p><strong>DPAPI Setup</strong></p>
<p>1. Create the directory <strong>C:\DPAPI</strong> and copy the contents from the DPAPI directory (found in <a title="DPAPI Binaries" href="http://dagrind.com/files/2010/02/DPAPIBinaries.zip">DPAPIBinaries.zip</a>) into the new directory.</p>
<p>2. Create a local Windows account that will be used to run the Enterprise Services Application and Windows Service with the username <strong>DPAPIAccount</strong>. Make sure to uncheck the <strong>User must change password at next logon</strong> check box and check the <strong>Password never expires</strong> check box. Use the Local Security Policy tool in the Administrative Tools programs group to give the account the <strong>Log on locally</strong> and <strong>Log on as a batch job</strong> privileges.</p>
<p>You must log off with your current account and login as the DPAPIAccount user to create the user profile. Once you have logged in as the DPAPIAccount user you can then log off and log back in as your normal account.</p>
<p>3. Open a command prompt and run the following command to register the serviced component.</p>
<p><strong>regsvcs C:\DPAPI\DPAPIComp.dll</strong></p>
<p>4. Open the Component Services management console and navigate to the Component Services-&gt;Computers-&gt;My Computer-&gt;COM+ Applications folder. Right-click on the <strong>DPAPI Helper Application</strong> application and select the <strong>Properties</strong> menu option.</p>
<p>6. Click on the <strong>Identity</strong> tab and select the <strong>This user</strong> radio button. Enter the MachineName\DPAPIAccount username and password and then click on the OK button.</p>
<p>7. Expand the DPAPI Helper Application-&gt;Roles folder. You will need to add the users to the Roles\Users nodes that will need access to encrypt and decrypt. All users that need access to encrypt and/or decrypt must also be added to the Marshaler\Users node.</p>
<p>Add the MachineName\ASPNET ("NETWORK SERVICE" in IIS 6.0) user to all three groups for this example since we will test encrypting and decrypting through an ASP.NET application.</p>
<p>8. Open a command prompt and run the following command to install the Windows service.</p>
<p><strong>installutil C:\DPAPI\DPAPIService.exe</strong></p>
<p>Enter the MachineName\DPAPIAccount ("NETWORK SERVICE" in IIS 6.0) username and password and click the "OK" button.</p>
<p>9. Open the Services management console and start the <strong>DPAPI Service</strong> service.</p>
<p>10. Open the IIS management console and add a new virtual directory named <strong>DPAPIWeb</strong>.</p>
<p>11. Copy the contents from the DPAPIWeb directory (found in <a title="DPAPI Binaries" href="http://dagrind.com/files/2010/02/DPAPIBinaries.zip">DPAPIBinaries.zip</a>) into the new virtual directory.</p>
<p>12. Open <strong>http://localhost/DPAPIWeb/WebForm1.aspx</strong> in a browser and test encrypting and decrypting. Obviously, you would want to make sure that this application was not accessible outside of the local server.</p>
]]></content:encoded>
			<wfw:commentRss>http://dagrind.com/2010/02/10/dpapi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

