Im trying to move a mvc project from vs 2012 to vs 2013 rc
I created a new mvc project using .net 4.5.1copied the code from the existing project
this line gives an error :
[GridDataSourceAction]The safety rules for inheritance was violated by type: 'Infragistics.Web.Mvc.GridDataSourceActionAttribute'. Derived types must either match the access to the security of the base type or be less accessible.
Hello Christian,
I created a new MVC 4 project targeting .net 4.5.1 in VS 2013 RC and referenced Infragistincs.Web.Mvc.dll version 4.13.1.2217 and the project compiles successfully.
The Infragistics.Web.Mvc.GridDataSourceActionAttribute type derives from System.Web.Mvc.FilterAttribute and implements System.Web.Mvc.IActionFilter. Both of them reside in System.Web.Mvc.dll and in my project its version is v4.0.0.0. Can you check what version of System.Web.Mvc.dll you reference in your project?
Best regards,Martin PavlovInfragistics, Inc.
System.Web.Mvc.dll is version 5.0.0.0
If I remove [GridDataSourceAction]
It compile ok
I need the [GridDataSourceAction] for my grids DataSource calls
When I put a grid in the view I get a TypeAccessException
An exception of type 'System.TypeAccessException' occurred in App_Web_y2k0bpxn.dll but was not handled in user code
Additional information: Den sikkerhedsgennemsigtige metode 'Infragistics.Web.Mvc.HtmlHelperExtensions.Infragistics(System.Web.Mvc.HtmlHelper`1<!!0>)' forsøgte at få adgang til den sikkerhedskritiske type 'System.Web.Mvc.HtmlHelper`1<TModel>', men forsøget mislykkedes.
Assemblyen 'Infragistics.Web.Mvc, Version=4.13.1.2217, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' er markeret med AllowPartiallyTrustedCallersAttribute og bruger gennemsigtighedsmodellen for sikkerhed på niveau 2. Gennemsigtighed på niveau 2 bevirker, at alle metoder i AllowPartiallyTrustedCallers-assemblyer som standard bliver sikkerhedsgennemsigtige, hvilket kan være årsagen til denne undtagelse.
The issue is caused by System.Web.Mvc.dll version 5 and not .NET Framework 4.5.1.
Microsoft removed the AllowPartiallyTrustedCallersAttribute from the System.Web.Mvc.dll v 5.0, thus Infragistics.Web.Mvc.dll is not conforming to the runtime security rules anymore (when used in combination with System.Web.Mvc.dll v 5.0). I've created a internal work item with number: 154763 to address this change. You can track its progress in your account in the 'Support Activity' page. Also we will provide Infragistics.Web.Mvc.dll compiled against System.Web.Mvc.dll v 5.0 when it is available as RTM.
Best regards, Martin Pavlov Infragistics, Inc.
Hi,
Any news on this issue, please ?
Best regards,
Alex.
ver. 13.2 resolved the problem, but I have the same problem with
infragistics.mobile.js also ver. 13.2
Many thanks Martin, this solved my problem.
Hello Mark,
You're using version of Infragistics.Web.Mvc.dll which is compiled against MVC 4. In the version 4.13.2.2055 the number 4 denotes the System.Web.Mvc.dll major version against which it is compiled.
In order to fix this you need Infragistics.Web.Mvc.dll is version 5.13.2.2055. You can find it in the following path (if you installed Infragistics products in the default location): C:\Program Files (x86)\Infragistics\2013.2\IgniteUI\MVC\MVC5\Bin.
Hope this helps,Martin PavlovInfragistics, Inc.
Good Morning Martin
I have just updated to 2013.2 and also updated all NuGet packages within my VS2012 project.
The solution compiles without a problem, but when running the application I get the following error in this code block:-
<script src="~/Infragistics/js/infragistics.loader.js"></script>@(Html.Infragistics().Loader() .ScriptPath(Url.Content("~/Infragistics/js/")) .CssPath(Url.Content("~/Infragistics/css/")) .Resources("igGrid") .Render() )
Attempt by security transparent method 'Infragistics.Web.Mvc.HtmlHelperExtensions.Infragistics(System.Web.Mvc.HtmlHelper`1<!!0>)' to access security critical type 'System.Web.Mvc.HtmlHelper`1<TModel>' failed.
My Infragistics.Web.Mvc.dll is version 4.13.2.2055 and my System.Web.Mvc.dll is version 5.1.20129.0
Please advise what I am doing wrong.
Hello All,
We fixed the security issue for the Infragistics.Web.Mvc.dll only, that's why you see the same error for Infragistics.Web.Mvc.Mobile.dll. Will provide the fix for it in the next SR.
Sorry for the inconvenience.
P.S.: Related thread Mode Listview .net 4.5.1
Martin PavlovInfragistics, Inc.
Sounds like you may have the solution. How did you get hold of the service release that fixed this ??
Thanks..