daGrind
10Feb/100

DPAPI

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 | Source

DPAPI Setup

1. Create the directory C:\DPAPI and copy the contents from the DPAPI directory (found in DPAPIBinaries.zip) into the new directory.

2. Create a local Windows account that will be used to run the Enterprise Services Application and Windows Service with the username DPAPIAccount. Make sure to uncheck the User must change password at next logon check box and check the Password never expires check box. Use the Local Security Policy tool in the Administrative Tools programs group to give the account the Log on locally and Log on as a batch job privileges.

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.

3. Open a command prompt and run the following command to register the serviced component.

regsvcs C:\DPAPI\DPAPIComp.dll

4. Open the Component Services management console and navigate to the Component Services->Computers->My Computer->COM+ Applications folder. Right-click on the DPAPI Helper Application application and select the Properties menu option.

6. Click on the Identity tab and select the This user radio button. Enter the MachineName\DPAPIAccount username and password and then click on the OK button.

7. Expand the DPAPI Helper Application->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.

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.

8. Open a command prompt and run the following command to install the Windows service.

installutil C:\DPAPI\DPAPIService.exe

Enter the MachineName\DPAPIAccount ("NETWORK SERVICE" in IIS 6.0) username and password and click the "OK" button.

9. Open the Services management console and start the DPAPI Service service.

10. Open the IIS management console and add a new virtual directory named DPAPIWeb.

11. Copy the contents from the DPAPIWeb directory (found in DPAPIBinaries.zip) into the new virtual directory.

12. Open http://localhost/DPAPIWeb/WebForm1.aspx 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.

5May/070

Visual Studio 2005 – Recent Projects (Update)

I have updated the Recent Projects tool that I created to support Orcas. You can download the Recent Projects application here.

1May/070

Visual Studio 2005 – Recent Projects

I do not know about you, but I like to have full control over everything and it drives me crazy that Visual Studio 2005 does not offer an easy way to delete items from the Recent Projects list on the start page from within the IDE. I did a little looking around and see that the list of projects is stored in the registry.

Visual Studio 2005
HKCU\Software\Microsoft\VisualStudio\8.0\ProjectMRUList

Microsoft Visual C# 2005 Express Edition
HKCU\Software\Microsoft\VCSExpress\8.0\ProjectMRUList

Visual Web Developer 2005 Express Edition
Software\Microsoft\VWDExpress\8.0\ProjectMRUList

I created a very simple .NET 2.0 windows application that allows you to delete specific projects or clear an entire list of projects for a specific version of Visual Studio 2005. This is really nice because the key names must be sequential named/numbered (i.e. File1, File2, File2). Who wants to go into regedit and manually rename "File3" through "File10" after deleting "File2"? This application makes managing the recent project lists a quick and painless task. You can download the Recent Projects application here. Please feel free to download and use this application. This application requires Windows and the .NET Framework 2.0.

I am downloading the bits for Orcas Beta 1 and will see if they have addressed this issue or if I need to add support to my Recent Projects application.

23May/050

Visual Studio 2005 Beta 2 + SQL Server 2005 CTP – April Dev

This weekend I installed Visual Studio 2005 Team Suit Beta 2 and SQL Server 2005 CTP - April 2005 - Developer Edition. I followed these steps to uninstall VS 2005 and SQL Server 2005 before I began installing the updated version. The VS 2005 Beta 2 uninstall went smooth, but the SQL Server Beta 2 uninstall was anything but smooth. SQL Server Beta 2 and components seemed to uninstall correctly, so I proceeded to install the new version of SQL Server 2005. When the new version of Yukon was installed, I noticed that I was missing the tools and DTS (these features were enabled)!

Next, I uninstalled Yukon and then installed the 2.0.40607 version of the .NET Framework. I then installed/uninstalled the first version of SQL Server 2005 Beta 2 that I started with (originally installed in January). The ghost entries were still there after this uninstall…

Finally, I used this tool to see what MSI was reporting to be installed. I then tried to use msiexec /x which seemed to work from the dialogs, but the ghost entries were still hanging around. I finally fired up my good friend, regedit, and removed all entries matching the ghost MSI entries. Once the registry entries were removed, the April CTP install completed successfully and I finally had the tools and DTS.

The installation of Visual Studio 2005 Beta 2 went smooth and I made sure to disable the SQL Server 2005 Express option. Everything it working great now!

24Mar/052

New Blog Application

I finished the basic version of my new blog system this evening with the addition of the comment system. My blog application is not as feature rich as .Text at the moment, but it has been a fun project. Over the next week, I am going to update the Articles and Examples sections with new content.

The weekend is at hand! We watched both of The Incredibles DVDs last weekend. I always enjoy watching the "behind the scenes" and seeing what the guys at Pixar go through making their great movies. Their movies would not be possible without their awesome software developers (their artists and animators are ok too ;) !