Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 31, 2012 07:37 AM by gtscdsi
Jul 24, 2012 09:43 AM|LINK
We've had a really troubling bug show up twice now - once on a dev machine and once on production - where a UIHint attribute applied in a metadata class won't be applied to the MetaColumn for the life of the application.
The entity and metadata classes are in a separate assembly, and are loaded into the site and a few other services. Everything works fine, including metadata attributes for all other entitysets, but custom metadata for one column just wasn't there
Column.Attributes.OfType<UIHint>().Count //=> 0
On the dev machine this problem persisted through a few rebuilds, but as no other machine exhibited it for the same project we decided it was a weird config glitch we'd get back to later. However now the same symptoms are showing up on prod (for a different
column / table.)
We fixed it on prod by forcing an app restart but obviously we can't go through the site every time we deploy and check for missing UIHint attributes.
This is an especially difficult bug to trap because it seems impossible to reliably reproduce. Can anyone with a better knowledge of .net suggest ways we could isolate it?
(Using DynamicData 4, Entity Framework 4, .net framework 4 fwiw)
Update: this is now happening on production semi-regularly. Each time, forcing an app restart solves it, but it comes back after an unknown amount of time. We're doing some automated monitoring to try and pin down the time frame at least.
uihint controlparameters mvc
Jul 25, 2012 02:56 PM|LINK
Hi zwitterion, I have not seen this ever and I have created dozens LOB apps using DD I can only assume it somtnhing to do with the seperate assembly as that is the only thin you have different from my set up. it may be worth while cleaning out the bin and
obj folder then doing a redeply when you can have the site down. I have had weired issues where is seems I was not getting some of my latest assemblies and this was a good fix.
Jul 26, 2012 01:00 AM|LINK
Do you mean that when you entitle some public property with UIHint, and it doesn't work or you cannot see the UIHint attribute？
Jul 27, 2012 04:19 AM|LINK
That's right, we tag a property with a UIHint in a metadata class in an assembly that gets loaded into the site, and sometimes that UIHintAttribute doesn't show up on that property at runtime. Restarting the app sometimes fixes the problem, and interestingly
it seems to repeatedly happen on the same property (metadata of all other properties of all other classes will be fine)
Jul 31, 2012 07:37 AM|LINK
can you add trace to your assembly and monitor on it?