2013-10-01 52 views
0

使用一些示例我試圖獲得在asp.net MVC應用程序中工作的SS身份驗證。我正在使用此行:在服務棧中缺少ToRequestContext方法

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

無論我做什麼,我都找不到「ToRequestContext」。我相信我已經添加了正確的使用:

using ServiceStack.WebHost.Endpoints.Extensions; 

有什麼建議嗎?

回答

1

HttpContext.ToRequestContext()擴展方法住在ServiceStack.HttpExtensions,所以正確的命名空間將只是:

using ServiceStack; 
+0

滑稽足夠了 - 這是在cs文件的第一行。清理項目並重新啓動VS10幾次解決了它。我現在覺得自己像個白癡 – SeanH