Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ComponeneOne GridComponeneOne Grid
Previous
 
Next
New Post
5/24/2006 7:16 AM
 

With .Net Framework 1.1 I successfully used ComponeneOne WebGrid control. I am now attempting a move to DNN 4.0.3.

When I attempt to load a module containing the C1 webgrid I get an exception:

"Attempted to access a field that is not accessible by the caller"

It fails in Skin.VB at line 466:

objPortalModuleBase = CType(Me.LoadControl("~/" & objModule.ControlSrc), PortalModuleBase)

It is enough to just place the C1WebGrid on the page to cause the error at run time. It just cannot load a module containing this control.  A standard out of the box VS2005 grid causes no trouble.

Has anyone else tried using C1 controls?

Declan

 

DotNetNuke.Services.Exceptions.ModuleLoadException: Attempted to access a field that is not accessible by the caller. --->
System.Web.HttpParseException: Attempted to access a field that is not accessible by the caller. ---> System.FieldAccessException: Attempted to access a field that is not accessible by the caller. at System.Reflection.RtFieldInfo.PerformVisibilityCheckOnField(IntPtr field, Object target, IntPtr declaringType, FieldAttributes attr, UInt32 invocationFlags) at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency) at System.Reflection.RtFieldInfo.GetValue(Object obj) at System.Attribute.GetHashCode() at C1.Util.DLL2XSD.IntellisenseAttribute.b() at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetAttributes() at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.
DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes() at System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType) at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildBuildMethod(ControlBuilder builder, Boolean fTemplate, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse, Boolean fControlSkin) at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse) at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse) at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers() at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree() at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder) at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) --- End of inner exception stack trace --- at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) in C:\Inetpub\wwwroot\BradyCo\Library\Components\Skins\Skin.vb:line 466 --- End of inner exception stack trace ---


 
New Post
5/24/2006 12:56 PM
 

Rather than placing the grid on the ascx I tried creating it at run time. 

When I declare it :

Dim C1WebGrid2 As New C1.Web.C1WebGrid.C1WebGrid

I get an exception:

That assembly does not allow partially trusted callers.

How do I get around this?


 
New Post
5/24/2006 2:45 PM
 

On attempting to use C1WebGrid without placing the contrl on the ascx at design time I have tried creating the control at run time.  When I do this I get an exception:

A critical error has occurred.
That assembly does not allow partially trusted callers.

 

InnerException: That assembly does not allow partially trusted callers.
Message: DotNetNuke.Services.Exceptions.PageLoadException: That assembly does not allow partially trusted callers. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at dws.Modules.BradyCo_Diary.ViewBradyCo_Diary.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) The action that failed was: LinkDemand The Zone of the assembly that failed was: MyComputer --- End of inner exception stack trace ---


 
New Post
5/24/2006 3:24 PM
 

This problem seems to have something to do with Trust levels:

DotNetNuke.Services.Exceptions.ModuleLoadException: That assembly does not allow partially trusted callers. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at ASP.desktopmodules_bradyco_diary_viewbradyco_diary_ascx.__BuildControlC1WebGrid1() at ASP.desktopmodules_bradyco_diary_viewbradyco_diary_ascx.__BuildControlTree(desktopmodules_bradyco_diary_viewbradyco_diary_ascx __ctrl) in C:\Inetpub\wwwroot\BradyCo\Website\DesktopModules\BradyCo_Diary\ViewBradyCo_Diary.ascx:line 1 at ASP.desktopmodules_bradyco_diary_viewbradyco_diary_ascx.FrameworkInitialize() in C:\Inetpub\wwwroot\BradyCo\Website\DesktopModules\BradyCo_Diary\ViewBradyCo_Diary.ascx.vb:line 912306 at System.Web.UI.UserControl.InitializeAsUserControlInternal() at System.Web.UI.TemplateControl.LoadControl(IWebObjectFactory objectFactory, VirtualPath virtualPath, Type t, Object[] parameters) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) in C:\Inetpub\wwwroot\BradyCo\Library\Components\Skins\Skin.vb:line 466 The action that failed was: LinkDemand The Zone of the assembly that failed was: MyComputer --- End of inner exception stack trace ---


 
New Post
5/26/2006 4:25 AM
 

Changing trust level to full allows the grid load. I have been in contact with Component One and am hopeful of a resolution.

Thanks Cathal.

Change:
<trust level="Medium" originUrl="http://localhost/.*"/>

to:
<
trust level="Full" originUrl="http://localhost/.*"/>

 


 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0ComponeneOne GridComponeneOne Grid


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out