Scary Problem in AddBusinessRules

Scary Problem in AddBusinessRules

Old forum URL: forums.lhotka.net/forums/t/3370.aspx


david.wendelken posted on Monday, August 13, 2007

I'm trying - quite unsucessfully so far :(  - to modify the AddBusinessRules method to add rules from a list of rules in the database.

In the process of trying to figure out the correct syntax, my code threw an exception.

I changed the code in the method and started the application again from Visual Studio.

Here's the scary part: the "new" AddBusinessRules method did not fire, it apparently used the partial list of rules considered the last run to have set up the rules.

That means that my application is running with only some of the rules loaded.  That's bad!

I'm not sure - at this time - whether this is a visual studio-only problem or whether it could happen in production.

JoeFallon1 replied on Monday, August 13, 2007

Recall that Rocky only adds the rules once per type. And he does this the first time the type is referenced in the app domain.

Just because you re-start VS does not mean the app domain has been torn down. I always re-start IIS too when I want to be sure I have a "clean start".

Joe

 

Copyright (c) Marimer LLC