سؤال

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?

هل كانت مفيدة؟

المحلول

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

using ServiceStack;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top