Search code examples
asp.net-mvcexceptionservicestackmod-mono

ToRequestContext method missing in servicestack


Using some examples I am attempting to get SS authentication working in an asp.net MVC application. I am using this line:

authService.RequestContext = System.Web.HttpContext.Current.ToRequestContext();

No matter what I do, I cannot find "ToRequestContext". I believe I've added the proper using:

using ServiceStack.WebHost.Endpoints.Extensions; 

Any suggestions?


Solution

  • The HttpContext.ToRequestContext() extension method lives in ServiceStack.HttpExtensions, so the correct namespace would be just:

    using ServiceStack;