2013-04-08 26 views

回答

1

HttpContext.Current.Response.Redirect應該可以在幾乎任何地方工作。不是最可測試的代碼,但它會做你想做的。

+0

謝謝你的回覆..當我嘗試我收到錯誤「無法重定向HTTP頭後已發送。」發送給我的行... UrlHelper urlHelper = new UrlHelper(_httpContext.Current()。Request.RequestContext); _httpContext.Current()。Response.Redirect(urlHelper.RequestContext.HttpContext.Request.ApplicationPath +「/ admin/Anonymous」); – 2013-04-08 10:17:33

+0

你從哪裏來的? – 2013-04-09 04:47:00

+0

在RolesBasedAuthorizationService.cs/* * Orchard.Roles.service/ – 2013-04-09 05:43:55

相關問題