Attrubutes are just metadata for your code. They are not executed automatically. If you want to use some metadata, you should get it manually and execute it. In your case constructor of attribute will be executed when you'll try to get method custom attributes:
object[] attributes = methodInfo.GetCustomAttributes(true);
If you want some aspects to be executed automatically, when you invoke method, then you can use some AOP framework, like PostSharp. Here is an example of aspect creation, which executes some actions on method call:
[Serializable]
public class SecurityImplAttribute : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionArgs args)
{
// this code will be executed on method call
}
}
When you apply this attribute to some method, PostSharp will read method's metatada during compilation, and if aspect will be found, PostSharp will inject your code right into binaries.