Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
TypeAccessException with IgniteUI.MVC 16.2
posted

I have a web application that uses IgniteUI.MVC v16.1.

I am trying to move to 16.2

I have installed IgniteUI.MVC 16.2 via NuGet.

Now, when I use the html helpers I get this error :

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.16.2.2040, 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.

How can I solve this ?

Parents
  • 23953
    Offline posted

    Hello Stokomani,

    You're probably using ASP.NET MVC5, but the Infragistics.Web.Mvc.dll reference in the project is built against MVC4. Try referencing Infragistics.Web.Mvc.dll version 5.16.2.2040 and see if the issue disappears.
    Your Infragistics.Web.Mvc reference in the project file should look like this:


    <Reference Include="Infragistics.Web.Mvc, Version=5.16.2.2040, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">  <HintPath>..\packages\IgniteUI.MVC.16.2.20162.2040\lib\net451\Infragistics.Web.Mvc.dll</HintPath>
     <Private>True</Private>
    </Reference>

    Best regards,
    Martin Pavlov
    Infragistics, Inc. 

Reply Children
No Data