Get User Name for NT Authentication in C#
Lots of systems sit behind an NT Authentication wall to keep the unwanted users out, but does it really do you any good if you don’t know which user made a given update to a system. Also this is good if you want to give a certain user administrative privledges, displaying certain functionality while hiding it from the rest of your users. The easiest way to get at that piece of information is to jump down into the System.Security.Principal.WindowsIdentity class and hit up the GetCurrent().Name method. Note this will pull back the user name preceeded by the domain they are logged onto so to ditch that you’ll just need to clean it up with a Regex statement (ex: Regex.Replace(sNTUser,”DOMAINNAME.”,”"))
Adding Project to Source Control in Visual Studio
This is probably old hat to most here, but Source Control is still fairly new to me within the context of Visual Studio. Case in point, I was trying to take a local project I had developed on my box and integrate it into a solution already created on the Team Foundation Server. I checked the solution out then I was dead in the water. It seems the key is to right click on the name of your project in the Solution Explorer window then select ‘Add Solution to Source Control.’ Now all you need to do is check in your changes and you are set.SQL Server Noise Words
If you do FULLTEXT searches in SQL Server, you are very aware of the limitations of noise words. Noise words are basically words that get dropped from the query. They are like common articles like ‘a’, ‘an’, etc. These words are contained in the file c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\noiseENU.txt (path may vary based on your directory setup). Here is the full list if you are looking to see if one of your terms is getting dropped
| about 1 after 2 all also 3 an 4 and 5 another 6 any 7 are 8 as 9 at 0 be $ because been before being between both but by came can |
come could did do does each else for from get got has had he have her here him himself his how if in into is it its just like make many me might |
more most much must my never no now of on only or other our out over re said same see should since so some still such take than that the their them then |
there these they this those through to too under up use very want was way we well were what when where which while who will with would you your |
