In components software world,its security model is different from user-based access control.This paper focuses on code security problem in network,explain security mechanism base on.NET environment,research and analysis CAS and attribute principle,and design common authorization access control model,implement code level authorization access control on customized security attribute,insure application's security and flexibility.