AppHost, Mvc3 & Mono

90 views
Skip to first unread message

Sergey B.

unread,
Jun 3, 2012, 3:01:14 PM6/3/12
to ServiceStack .NET Open Source REST Web Services Framework
Hi,

I have started using ServiceStack Mvc3 pack. It works perfectly on
Windows but not on Mono 2.10.8.1. The REST services seems are if the
following line in AppHost.cs is commented:
ControllerBuilder.Current.SetControllerFactory(new
FunqControllerFactory(container));

If it's not commented I'm getting compilation error:

App_Start/AppHost.cs(75,72): error CS0584: Internal compiler
error: Method not found:
'ServiceStack.Mvc.FunqControllerFactory..ctor'.
App_Start/AppHost.cs(75,51): error CS1502: The best overloaded
method match for
`System.Web.Mvc.ControllerBuilder.SetControllerFactory(System.Web.Mvc.IControllerFactory)'
has some invalid arguments
App_Start/AppHost.cs(75,51): error CS1503: Argument `#1'
cannot convert `object' expression to type
`System.Web.Mvc.IControllerFactory'

I'm using SerivceStack 3.7.9.0 and ServiceStack.Mvc.3.7.8 where
FunqControllerFactory is defined. Any ideas why I'm getting that error
and how to avoid it?

Sergey B.

unread,
Jun 4, 2012, 9:19:29 AM6/4/12
to ServiceStack .NET Open Source REST Web Services Framework
I've found the solution. It seems ServiceStack.Mvc uses ServiceStack
3.7.8 in the references but NuGet added automatically 3.7.9. That
version mismatch caused the problem:
error CS1502: The best overloaded method match for
`System.Web.Mvc.ControllerBuilder.SetControllerFactory(System.Web.Mvc.IControllerFactory)'
has some invalid arguments

In my case the solution was to rebind all references in Mvc site from
3.7.9 to 3.7.8 or rebuild ServiceStack.Mvc against ServieStack.3.7.9.

Demis Bellot

unread,
Jun 4, 2012, 10:29:55 AM6/4/12
to servic...@googlegroups.com
Ahh ok, thx for the head up. Hopefully all these versioning issues will be fixed with the new CI builds.
--
- Demis


Sergey B.

unread,
Jun 4, 2012, 11:19:54 AM6/4/12
to ServiceStack .NET Open Source REST Web Services Framework
Yeah, that would be great. Anyway, I think it's more a Mono issue
since under windows everything was working as expected and that lead
me to incorrect
path. It seems Mono more demanding to version mismatch issue. :)
Reply all
Reply to author
Forward
0 new messages