Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8361967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:49:36+00:00 2026-06-09T11:49:36+00:00

I have created a servicestack MVC project, this I use as the main API

  • 0

I have created a servicestack MVC project, this I use as the main API for the database.
because I want to access the models in my code I have also added a reference to this project in my MVC Views Project and Controllers project.

However I am having real problems when I run my project [ the web site project ]
in that ServiceStack thinks it owns my solution, and takes over all request, and is then unable to resolve my routes.

I have added routes in the web projects global file, I have also tried adding these routes to the servicestack project, but still unable to resolve.

here is the error:

[ResolutionException: Required dependency of type      uyr.print.controllers.Controllers.UsersController could not be resolved.]
    Funq.Container.ThrowMissing(String serviceName) in        C:\src\ServiceStack\src\ServiceStack\Funq\Container.cs:297
   Funq.Container.GetEntry(String serviceName, Boolean throwIfMissing) in C:\src\ServiceStack\src\ServiceStack\Funq\Container.cs:275
   Funq.Container.ResolveImpl(String name, Boolean throwIfMissing) in C:\src\ServiceStack\src\ServiceStack\Funq\Container.cs:112
  Funq.Container.ResolveNamed(String name) in C:\src\ServiceStack\src\ServiceStack\Funq\Container.Overloads.cs:283
  Funq.Container.Resolve() in C:\src\ServiceStack\src\ServiceStack\Funq\Container.Overloads.cs:230
   lambda_method(Closure , Container ) +41
    ServiceStack.ServiceHost.ContainerResolveCache.CreateInstance(Type type, Boolean tryResolve) in C:\src\ServiceStack\src\ServiceStack\ServiceHost\ContainerResolveCache.cs:62
   ServiceStack.ServiceHost.ContainerResolveCache.CreateInstance(Type type) in C:\src\ServiceStack\src\ServiceStack\ServiceHost\ContainerResolveCache.cs:37
   ServiceStack.Mvc.FunqControllerFactory.GetControllerInstance(RequestContext   requestContext, Type controllerType) in   C:\src\ServiceStack\src\ServiceStack.FluentValidation.Mvc3\Mvc\FunqControllerFactory.cs:38
    System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +232
   System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +49
   System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
    System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970356
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

If anyone can point me in the right direction here, it would be much appreciated.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:49:38+00:00Added an answer on June 9, 2026 at 11:49 am

    in that ServiceStack thinks it owns my solution, and takes over all request, and is then unable to resolve my routes.

    ServiceStack doesn’t own anything you don’t explicitly tell it to.

    ServiceStack ControllerBuilder.Current.SetControllerFactory(new
    FunqControllerFactory(container));

    This tells MVC to use ServiceStack built-in Funq IOC to resolve and auto-wire all MVC Controllers. Typically if you have ServiceStack + MVC running together in the same project you want to use the same IOC to resolve ServiceStack services and MVC Controller dependencies.

    Uncomment that line if you don’t want MVC Controllers to use ServiceStack’s IOC.

    Handler Path Configuration

    In the Web.config you also tell ServiceStack exactly what path you want ServiceStack to handle.

    These are the only 2 places where ServiceStack is configured to handle requests. If you don’t have any of these configurations than the ServiceStack dlls are benign and doesn’t have any effect on your project. i.e. There are no HTTP Modules registered that invasively attempts to hi-jack requests.

    The only library here with that problem is MVC where it thinks it owns the whole solution, even after telling IIS to delegate all /api requests to ServiceStack (with the Web.Config) you also need to tell MVC to explicitly ignore these routes with:

    routes.IgnoreRoute("api/{*pathInfo}"); 
    

    Otherwise it will try to handle them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a tab-pane using HAML as shown in my code snippet below
have created REST service using servicestack and in post request I have return object
I have built a service with ServiceStack (customer example) as per this link: https://docs.google.com/present/view?id=dg3mcfb_213gsvvmmfk
Have created a ATL COM project through which I am inserting Menu Items to
I have created form using ModelForm but its not saving data into database. views.py
We have a legacy server code that we want to abandon and develop new
I have created a SSRS 2008 report.I have created a matrix.I want to make
I have created a smalldatetime field. I am using a dbml file to access
I have created a windows service which is set to start automatically. This service
I have created a custom dialog for Visual Studio Setup Project using the steps

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.