【发布时间】:2019-01-14 22:38:31
【问题描述】:
我需要在 ASP.NET Core 2.2 的类库中访问HttpContext.Current
HttpContext.Current.Request.Url.ToString().Contains("SAMLart")
当我尝试仅尝试使用 HomeController 中的方法时,我正在尝试移植代码,而 HttpContext 在主 Web 项目中甚至没有 Current。
【问题讨论】:
-
您找到解决方案了吗?我也在类库中面临这个问题
标签: c# asp.net-core asp.net-core-mvc asp.net-core-2.0 httpcontext