Custom data annotations with webservice in ASP.NET 3.5

I can't create a custom ValidationAttribute in asp.net 3.5 webservice.Everything seems ok, it compiles and it runs, it just doesn't enter the custom attribute i created. Msdn documentation states that I have to override the IsValid method to get it validated, still it doesn't enter the IsValid. I guess there's a configuration problem, and i can't see any other flaw in the code atm.So, here's the webservice code\[code\] [WebMethod] [Authorize("me")] public string test() { return "Here I am"; }\[/code\]and this is the ValidationAttributepublic class AuthorizeAttribute : ValidationAttribute { public string me { get; private set; } public AuthorizeAttribute(string me) { if (string.IsNullOrEmpty(me)) { throw new ArgumentNullException("Not me!"); }\[code\] this.me = me; } public override bool IsValid(object value) { bool result = false; return result; }}\[/code\]I would say that before the webmethod executes it goes into the Constructor(at least that!) and then into the IsValid method, but it doesn't.Can you say where's the error?Thanks/SballAaaaand seems i cannot format this question properly. Sorry
 
Back
Top