This is a migrated thread and some comments may be shown as answers.

Getting Security.VerificationException when finding RadMenu control

4 Answers 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chhuong
Top achievements
Rank 1
Chhuong asked on 12 Aug 2010, 02:13 AM
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?

4 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 12 Aug 2010, 08:34 AM
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
0
Chhuong
Top achievements
Rank 1
answered on 13 Aug 2010, 06:27 AM
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.
0
Konstantin Petkov
Telerik team
answered on 13 Aug 2010, 08:43 AM
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
0
Chhuong
Top achievements
Rank 1
answered on 13 Aug 2010, 09:43 PM
Yep. It is the same project. The issue is resolved now by removing all dlls and adding again.

Thanks.
Tags
General Discussions
Asked by
Chhuong
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Chhuong
Top achievements
Rank 1
Share this question
or