This project is read-only.


The tool was created to automate sharing of user's Automatic Instance of LocalDB with an ASP.NET application running in IIS under Application Pool Identity account. As described in Using LocalDB with Full IIS, Part 2: Instance Ownership post there are two steps of this process. First the automatic instance must be shared under a public name and an administrative login must be created for the Application Pool account. Second the connection string used by the application must be updated to use the shared instance address.

Step 1: Share Automatic Instance

To share user's Automatic Instance simply right-click in the LocalDB Companion icon in system tray and select Share Automatic Instance with ASP.NET. This takes care of sharing the instance and creating the login for Application Pool Identity account.

Step 2: Update connection string

The easiest way of getting the connection string for the newly shared instance is to right-click the LocalDB Companion icon again, and select Copy Connection String to Clipboard. This puts the following connection string template that can be pasted into application's web.config file:

Server=(localdb)\.\AspNet4PoolId;Integrated Security=SSPI;Database=???

Note that the Database property contains a placeholder value of ???. Replace it with whatever the name is for the database that is supposed to be used by the application.

Last edited Dec 30, 2011 at 5:53 PM by kozielczyk, version 3


No comments yet.