Getting Security.VerificationException when finding RadMenu control

5 posts, 0 answers
  1. Chhuong
    Chhuong avatar
    7 posts
    Member since:
    May 2009

    Posted 11 Aug 2010 Link to this post

    I am new to WebAii. I have a problem when finding a RadMenu control in my asp.net app. Here is my code.

    RadMenu menu = Find.ById<RadMenu>("ctlMainMenu");

    When I run the test, it throws the following exception.

    System.Security.VerificationException : Method ArtOfTest.WebAii.Core.Find.ById: type argument 'Telerik.WebAii.Controls.Html.RadMenu' violates the constraint of type parameter 'TControl'.


    Any thought?
  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 12 Aug 2010 Link to this post

    Hello Chhuong,

    The framework can't locate that type of element with the given Id on the page under test -- the type mismatches. Is this a public site you can share or can you paste here the relevant piece of the Html output for reference?

    Kind regards,
    Konstantin Petkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Chhuong
    Chhuong avatar
    7 posts
    Member since:
    May 2009

    Posted 13 Aug 2010 Link to this post

    It is intranet site. Just tried it on different machine and it is working fine with the exact same code. Something is wrong with my machine.
  4. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 13 Aug 2010 Link to this post

    Hello Chhuong,

    Is this the exact same project you run on both machines? I've seen this reported before when the solution/project mismatches the references to assemblies like Telerik.Web.UI and Telerik.WebAii.Controls.Html. You need the latter only for the test project. Is this a mixed app/test solution by any chance?

    Kind regards,
    Konstantin Petkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Chhuong
    Chhuong avatar
    7 posts
    Member since:
    May 2009

    Posted 13 Aug 2010 Link to this post

    Yep. It is the same project. The issue is resolved now by removing all dlls and adding again.

    Thanks.
Back to Top