Do you have entities in the WEB project ?
2008/10/26 Mike <[EMAIL PROTECTED]>
>
> I am struggling to get NHibernate.Validator working in my ASP.NET MVC
> application. I am unable to get the validator engine registered for
> the pre-insert and pre-update listeners. I have tried playing around
> with a few settings but haven't had any luck. Here is was my current
> configuration looks like:
>
> Configuration nhConfiguration = new Configuration();
>
> nhConfiguration.Configure();
>
> NHVConfiguration nhvConfiguration = new NHVConfiguration();
>
>
> nhvConfiguration.Properties[NHibernate.Validator.Cfg.Environment.ApplyToDDL]
> = "false";
>
> nhvConfiguration.Properties[NHibernate.Validator.Cfg.Environment.AutoregisterListeners]
> = "true";
>
> nhvConfiguration.Properties[NHibernate.Validator.Cfg.Environment.ValidatorMode]
> = "UseAttribute";
> nhvConfiguration.Mappings.Add(new
> MappingConfiguration("PersonalSite.Web", null));
>
> ValidatorEngine engine = new ValidatorEngine();
> engine.Configure(nhvConfiguration);
>
> ValidatorInitializer.Initialize(nhConfiguration, engine);
>
> I have tried to register the listeners using the SetListenser method
> but that didn't help. Is there anything I missed to get this working
> in a web scenario? Thanks
>
> >
>
--
Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---