Salient Solutions

wrasslin ones and nones for fun and profit - Sky Sanders' Blog
posts - 96, comments - 70, trackbacks - 0

Reflection

There are 2 entries for the tag Reflection
Get CustomAttributes the easy way....

A few extension methods to help out..... // Project: Salient.Reflection // http://salient.codeplex.com using System; using System.Collections.Generic; using System.Linq; using System.Reflection; public static class AttributeHelpers { /// <summary> /// Returns first non-inherited custom attribute of type T /// </summary> public static T GetCustomAttribute<T>(this ICustomAttributeProvider provider) where T : Attribute { return GetCustomAttribute<T>(provider, false); } /// <summary> /// Returns first custom attribute of type T in the inheritance chain ...

posted @ Wednesday, January 20, 2010 1:50 PM | Feedback (0) | Filed Under [ CodeProject-Tip ]

Salient.Web.Security.AccessControlModule

download source code and demo download this article in .doc format Overview I a previous article I complained about the lack of a true 403 Forbidden error in ASP.NET and the clumsy way that authentication is handled by FormsAuthenticationModule. The solution I came up with was a good first attempt but, in my opinion, came up short. Particularly when handling authentication of requests that ScriptModule touches. So I decided to take another swing at it, this time with some ammunition. I took the list of HttpModules from the root Web.config and the ScriptModule that is added to ASP.NET 3.5 web apps and dove in with...

posted @ Monday, August 17, 2009 10:18 PM | Feedback (1) |

Powered by: