Unable to cast object of type 'System.Reflection.RtFieldInfo' to type 'System.Reflection.PropertyInfo'

Aug 12, 2009 at 4:23 PM

All --

I am using Linq2SqlEb on an ASP.NET project and it works fine.

I tried to add DynamicData to the project and I started getting the following RTE...

"

Unable to cast object of type 'System.Reflection.RtFieldInfo' to type 'System.Reflection.PropertyInfo'

"

I checked for an answer and found this link...

http://forums.asp.net/t/1453669.aspx

At that link, some seem to be suggesting that DynamicData and Linq2SqlEb are incompatible.

I do not understand the reasons; but, I am a bit skeptical.

Has anyone else seen this RTE?

If you have looked at that link, what do you think of it?

Please advise.

(I can live without DynamicData. It is a nice value-add for a Q and D back-end admin console, that is all. Still, I would like to find a fix for this RTE, just in case.)

Thank you.

-- Mark Kamoski

 

Coordinator
Aug 13, 2009 at 10:45 PM

Hi Mark,

I'll look into this and get back to you.

Cheers

Matt

Coordinator
Aug 15, 2009 at 8:06 AM

Hi Mark,

I've had time to have a look, but have not had a play.

There's no properties on the LINQ2SQL class that I can see that don't have getters and settings - so i'm wondering whether it might be the inheritence or the enum thats used for the status types.

Have you had any luck figuring out what's triggering it yet?

Cheers

Matt

 

Aug 15, 2009 at 11:53 AM
Edited Aug 17, 2009 at 4:22 PM

NO, I HAVE NOT BOTHERED WITH THIS FURTHER THAN REPORTING IT HERE AT
CODEPLEX AND THERE AT THE WWW.ASP.NET SITE.

I SHOULD HAVE SAID THAT THIS THREAD IS MORE FYI THAN ANYTHING AFAIAC.

DO NOT KNOCK YOURSELF OUT ON MY REQUEST. I HAVE LINQ2SQLEB WORKING
JUST HOW I NEED IT AS SHOWN IN THE SAMPLE I RECENTLY UPLOADED
AT http://linq2sqleb.codeplex.com/SourceControl/PatchList.aspx AS
"NORTHWIND01_T4SAMPLE_YYYYMMDDHHMMSS". AND I
HAVE IT IN PRODUCTION NOW TOO. VERY NICE.

SLIGHT RANT FOLLOWS. MHO.

IT DOES NOT MATTER MUCH RIGHT NOW TO BECAUSE, WHILE I LIKE THE IDEA
BEHIND DYNAMIC DATA (AUTO-GENERATION OF A USER INTERFACE), I HAVE NOT
BEEN ABLE TO IMPLEMENT IT. THE UI COMES OUT LOOKING TOO MUCH LIKE A
TABLE BROWSER. FOR EXAMPLE, A USER HAS TO NAVIGATE A MODEL IF A
COMPOSITE OBJECT EXISTS RATHER THAN SEE THE EXPECTED DATA IN LOGICALLY
GROUPED PAGES. TO GET IT LOOKING DECENT IS A LOT OF WORK. NEXT
GENERATION LOOKS LIKE IT MUST BE OK.

THE IDEA OF AN AUTO-GENERATED UI IS A BIT OF A RED HERRING RIGHT NOW.
SHAREPOINT TRIES BUT IS CLUNKY. SAME WITH DOTNETNUKE. ETC. THERE ARE
TOO MANY PERMUTATIONS THAT A USER MAY LOOK FOR TO HAVE CODEGEN WORK
WELL IN THE UI. IF ALL USERS WERE DEVELOPERS THEN IT WOULD WORK. MORE
IS THE PITY THAT IS NOT THE CASE.

THANKS.

-- MARK KAMOSKI