[Mono-aspnet-list] Could not load type 'System.Web.Mvc.HttpGetAttribute'

monoonom monoonom at yahoo.com
Wed Dec 8 15:59:10 EST 2010


In my MVC-App when I add eg. HttpGet or HttpPost attribute to my
ActionMethods, I'm getting the following Error:

System.TypeLoadException: Could not load type
'System.Web.Mvc.HttpGetAttribute' from assembly 'MyMVC'.
  at System.Web.Mvc.ActionMethodSelector.PopulateLookupTables () [0x00000]
in <filename unknown>:0 
  at System.Web.Mvc.ActionMethodSelector..ctor (System.Type controllerType)
[0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ReflectedControllerDescriptor..ctor (System.Type
controllerType) [0x00000] in <filename unknown>:0 
  at
System.Web.Mvc.ControllerDescriptorCache+<GetDescriptor>c__AnonStorey12.<>m__17
() [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ReaderWriterCache`2[TKey,TValue].FetchOrCreateItem
(System.Web.Mvc.TKey key, System.Func`1 creator) [0x00000] in <filename
unknown>:0 
  at System.Web.Mvc.ControllerDescriptorCache.GetDescriptor (System.Type
controllerType) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.ControllerActionInvoker.GetControllerDescriptor
(System.Web.Mvc.ControllerContext controllerContext) [0x00000] in <filename
unknown>:0 
  at System.Web.Mvc.ControllerActionInvoker.InvokeAction
(System.Web.Mvc.ControllerContext controllerContext, System.String
actionName) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.Controller.ExecuteCore () [0x00000] in <filename
unknown>:0 
  at System.Web.Mvc.ControllerBase.Execute
(System.Web.Routing.RequestContext requestContext) [0x00000] in <filename
unknown>:0 
  at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute
(System.Web.Routing.RequestContext requestContext) [0x00000] in <filename
unknown>:0 
  at System.Web.Mvc.MvcHandler.ProcessRequest (System.Web.HttpContextBase
httpContext) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.ProcessRequest (System.Web.HttpContext
httpContext) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest
(System.Web.HttpContext httpContext) [0x00000] in <filename unknown>:0 
-----
There is no problems when I remove the attributes. I'm using Mono 2.8.1 on
Ubuntu.
Working Controller-method (notice, without [HttpGet]):
		//[HttpGet]
		public ActionResult Index ()
		{
			ViewData["Message"] = "Welcome to ASP.NET MVC on Mono!";
			
			return View ();
		}

Any hints?

Regards

-- 
View this message in context: http://mono.1490590.n4.nabble.com/Could-not-load-type-System-Web-Mvc-HttpGetAttribute-tp3079071p3079071.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.


More information about the Mono-aspnet-list mailing list