Thursday, May 10, 2012

IIS Application Pool Identity access to SQL Server

I recently had a need to connect to a SQL Server Express 2008 R2 instance using the 'Integrated Security=SSPI" option in my connectionString setting. Of course when I ran the site the first time, I got an error stating that IIS APPPOOL\{MyApplicationPoolName} could not access the database. So after a little searching, I found this post ApplicationPoolIdentity IIS 7.5 to SQL Server 2008 R2 not working. on the IIS Forums that provided the proper steps to grant the Application Pool Identity access to the database.


The necessary steps from the post are below for reference.


In SQL Server Management Studio ...
    • connect to your SQL Server and navigate to Security - Logins in Object Explorer.
    • Add a new login:
      • Create a Windows login with the name of your application pool. Use the virtual domain name "IIS AppPool", like: "IIS AppPool\{YourApplicationPoolName}"

        (Dont' forget to use the real application pool name after the backslash, e.g.: "IIS AppPool\DefaultAppPool")
      • Assign the new login to your database(s) in the User Mapping page of the New Login dialog.
        Give it any user name you find appropriate.
      • Save and close the New Login dialog.
    • In Object Explorer ...
      • Navigate to your database, then navigate to Security - Users
      • Navigate to your new user and set permissions according to your needs.

Monday, April 30, 2012

Solr 3.6

I am excited to see the latest improvements that are now available in Solr 3.6. Please see the following links for more details about the latest release:


For me the I am most looking forward to the improved HtmlStripCharFilterFactory and improvements to the FST based Suggesters.

Monday, January 23, 2012

TFS Compare Tool

The very first thing you should do before starting to use the TFS explorer, is to replace the Diff/Compare Tool. The one that comes with Visual Studio is pretty bad. Here is a good blog post - Replacing the TFS Diff Tool that shows how to quickly setup a new tool.

I prefer to use SourceGear DiffMerge, but you can use whatever you like. Just, please do yourself a favor and change it to something other than the default.

Wednesday, August 17, 2011

Following Open Source via RSS

I have recently been working on an ASP.NET MVC project, where I have included many Open Source projects. Most of them were included using NuGet (a great tool by the way, you should get it if you don't already have it!). So, for a lot of these open source projects that I an now using, I like to keep track of what changes are happening in the projects. A great way that I have found to do this, is to track the commits to the projects via RSS. I have subscribed to the RSS feed of the commits for the projects in Google Reader and then grouped them into an OpenSource folder that I can monitor. For me, this is a really easy way to see what is happening on a project and to watch out for interesting updates.

Tuesday, June 14, 2011

My Git Ignore File

I am using Git more and more these days and I really love how easy it is create branches and switch between them. If you have not tried out Git before, I really would encourage you to do so. Here is my current .gitignore file. This file basically tells Git what files to exclude when looking at a repository for changes, etc.

Tuesday, May 31, 2011

Entity Framework Serialization - Circular Reference

I have been working with KnockoutJS recently and needed to serialize an Entity Framework model to the client as JavaScript so that I could convert it to my Knockout ViewModel. Here is the entity that I needed to serialize.



However, when I attempted to serialize this object, I was getting an error "A circular reference was detected while serializing and object of type Person". I did a little research on this issue and found a good blog post by Rick Strahl on LINQ to SQL and Serialization, that discusses this issue.

The problem is the public Tags property. The first suggestion is to change the access modifier from public to internal. I did this and it worked great. I have not fully explored the ramifications of making this change to the rest of my application, but will post an update if I find anything.

Monday, April 25, 2011

Synergy 1.4.2 with Mac as Server and Windows 7 Client

I was setting up Synergy today so that I could control my Windows 7 laptop from my Mac. So I went out and installed the latest version of Synergy - 1.4.2 and I followed the great installation guide to get everything setup. Note that I also am using QSynergy to get the GUI on the Mac. I have my Synergy setup with my Mac as the server and Windows 7 as a client. Once I had everything set, I was able to move my mouse over to the Windows 7 machine, but the keyboard was not working. So I did some googling and came across issue #57 on the Synergy Support forums that describes this issue. According to this, it looks like the official fix for this will not be ready until version 1.4.4 of Synergy is released. However, Matthew Toso posted the 1.4.2 version of synergys with a patch applied for this issue. See note #82 in this thread. Once I installed the patched synergys on my Mac, the keyboard was working properly when I was over on my Windows 7 machine.