Error in ASP.NET MVC 4 with Visual Web Developer 2010 Express and .NET Framework 4.0
Error in ASP.NET MVC 4 with Visual Web Developer 2010 Express and .NET Framework 4.0
I have the following scenario:
- Visual Web Developer 2010 Express Service Pack 1
- .NET Framework 4.0
- ASP.NET MVC 4
- An SQL Server Express .mdf in AppData, with the "staff" fields
- The example of ASP.NET MVC in controller and the example "staff" model
- Settings configured to the AppData database
The problem comes when I try to access to /staff/table and gives me the following JSON:
{"draw":null,"data":[],"recordsTotal":null,"recordsFiltered":null,"error":"GenericArguments[0], \u0027DataTables.PostGetEventArgs\u0027, en \u0027System.EventHandler`1[TEventArgs]\u0027 infringe la restricción del parámetro de tipo \u0027TEventArgs\u0027.","fieldErrors":[],"id":null,"meta":{},"options":{},"files":{},"upload":{"id":null},"debugSql":null,"cancelled":[]}
Answers
Have you recompiled the DataTables.dll for .NET 4.0? The default distribution targets 4.5. Also because C# 6 features are used in the dll you'd need to install the C# 6 compiler (VS 2010 doesn't ship with it).
That's what immediately stands out to me from the above.
I assume that you've not modified the demo files at all and have installed the SQL database?
Thanks,
Allan
Hello Allan.
I thought that the dll was compiled for .NET Framework 4.0 because of the compatibility with it.
I have tried to compile the dll with the Visual Studio 2015 Community Edition.
I have changed the .NET Target Framework to 4.0.
I get the following error:
I need to use the .NET Framework version 4.0 because the server where the application will run is a Windows 2003 Server.
I have fixed that error at your source code making
PostEventArgs
extendEventArgs
(like the otherEventArgs
that you have in your source code).I suppose that was a mistake.
But it's strange that with .NET 4.5 compiles without an error with that class missing the inheritance, but with .NET 4.0 not.
It seems that if the library had that inheritance would work directly without recompiling.
Thank you Allan.
P.D: I also crave for the library for .NET Core.
P.D. 2: at the generator the button
Model
doesn't workP.D. 3: the generator project seems to fail if you don't have IIS installed. (Some sections of the project XML aren't recognized by the parser).
P.D. 4: what about a Java versión of the Editor?
Thanks! I'll get that fixed for the next release!
Me too! As soon as DbProvider is available in .NET Core, I'll have Editor working with it.
Thanks. I'll fix that as well!
Interesting. I'll check out what is going on there.
Not currently planned. There is JED which are server-side libraries for Editor in a Java environment, but they aren't supported by myself.
Regards,
Allan