SQL Server Profiler requires you to have ALTER TRACE permission. There are two ways to grant that permission. Properties: Object Explorer -> Security -> Logins -> your_login -> Securables -> Search button -> “The server” radio button -> “Grant” checkbox on “Alter Trace” SQL: GRANT ALTER TRACE TO myuser
Month: December 2010
Entity Framework Count Related Entities Without Loading
I ran across this post on Stack Overflow. Here is the code I ended up using: Dim count = (From x In db.Orders Where x.OrderID = orderID From y In x.OrderDetails Select y).Count
How to Hash Passwords for XML Files
To save a password hash to an XML file, you can call this function: FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text & "|" & txtUsername.Text, "SHA1") You can see my attempt at a password salt by simply apppending the Username.