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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMethodAccessException when viewing moduleMethodAccessException when viewing module
Previous
 
Next
New Post
1/26/2017 11:03 PM
 

I made a new module using Christoc's MVC template. The module installed just fine, and I was able to place it on my page. However, every time I load the page, I get a MethodAccessException that says

 

Attempt by method 'MODULE_NAME.Controllers.ItemController.Index()' to access method 'System.Web.Mvc.Controller.View(System.Object)' failedI

 

I searched for this error message, and I found very little information about how to fix it. If anyone could give me some advice about this, I would be deeply grateful.

 

 

 
New Post
1/30/2017 6:00 PM
 
Have you modified anything in the modules or is it all original from the template? I tried the template and saw no such errors.

Amarjit Dhunna Dnn Corp.
 
New Post
2/3/2017 1:12 AM
 

 

No, I have not modified anything. I am using Windows 10, IIS 10 with ASP.NET 4.6, Visual Studio 2015, and the latest version of Christoc's templates. I checked if DesktopModules was a virtual directory, and it is not. My site is configured to be the root "DNN_Platform" directory. The line that is causing this error is in ItemController.cs, line 84: "return View(items);".
 
New Post
2/14/2017 12:34 AM
 
I finally figured out what was wrong. In the global web.config file (in the root DNN directory), there was a redirect for System.Web.Mvc to version 5.2.3.0. I changed this so that it redirects to the version that is included with DNN (5.1.0.0).
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMethodAccessException when viewing moduleMethodAccessException when viewing module


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