Friday, February 25, 2005
Just wanted to post up something quickly so maybe someone searching won' go through the same silly mistakes I just made. When doing your own custom authentication in ASP.NET all you really have to do is set the Cookie for the user yourself and in the AuthenticateRequest Method in the global.asax generate your own custom IPrincipal and set to to Context.User. This works really great. If you have all your pages inheriting from a BasePage Class already for templating or whatever, you can then just hide the User Property of the Page Class with your own IPrincipal and you can
Thursday, February 10, 2005
In a project I'm doing I needed to basically do a DISTINCT on a couple fields in a DataTable that I had used earlier in code. Did some Google searching and came up with this MS KB on the subject. I was hoping to find it in the Framework, but hey, writing a little extra code never hurt anyway. Looking over the code though I found that I just didn't really like it. Biggest reason being it only took one field. I wanted to be able to pass in n number of fields, so I rewrote it and did a