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 don't think it is resolved; I am still getting the error:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.TypeAccessException: 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.Assembly 'Infragistics.Web.Mvc, Version=4.13.2.1010, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
Sorry,
I pushed the wrong button earlier.
the issue is actually resolved in Service Release IgniteUI_20132.2012_SR and not in the first release of 2013.2.
the application compiled right and run well after I applied the SR.
Sorry for any inconvenience.
Hi,
Sounds like you may have the solution. How did you get hold of the service release that fixed this ??
Thanks..
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.
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.
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.