.NET SqlClient(and other ODBC drivers as well) has a built-in solution. Your application’s
connection stringhas quite a few parameters available to provide configuration and information, and one that seems to get overlooked is
Application Name. This one does exactly what it says on the tin – it lets you specify a name that will be displayed to anyone looking for it in SQL Server, including
sp_whoisactive. Anyplace you have the ability to write a connection string, you can use this. It costs you nothing!
You can also start getting fancy with resource governor as well, segmenting pools based on application name.