小编Fil*_*p W的帖子

我在哪里可以找到WebMatrix.WebData.WebSecurity的源代码

我需要检查实现的代码WebMatrix.WebData.WebSecurity.

我可以看到WebSecurity在线实施的代码吗?(这是一个开源类)

security asp.net-mvc-4

8
推荐指数
1
解决办法
4114
查看次数

在WebApi2项目中使用CacheOutput属性时,依赖项的解析失败

在我的ASP.NET WebApi2项目中,我决定使用Strathweb.CacheOutput.WebApi2包来提供缓存和电子标签功能.但是,在放入CacheOutput属性后,我开始收到错误:

Microsoft.Practices.Unity.ResolutionFailedException: Resolution of the dependency failed, type = "WebApi.OutputCache.Core.Cache.IApiOutputCache", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, WebApi.OutputCache.Core.Cache.IApiOutputCache, is an interface and cannot be constructed. Are you missing a type mapping?
Run Code Online (Sandbox Code Playgroud)

显然,包的内部DI容器无法解析缓存提供程序.

我使用属性的方式:

[HttpGet, Route("")]
[CacheOutput(ClientTimeSpan = 60 * 60 * 4, ServerTimeSpan = 60 * 60 * 4)]
public HttpResponseMessage Get(
    string products,
    int? startYear = null,
    int? endYear = null,
    int? drillDownYear = null,
    int? drilldownMonth = …
Run Code Online (Sandbox Code Playgroud)

asp.net-web-api

5
推荐指数
1
解决办法
1213
查看次数

标签 统计

asp.net-mvc-4 ×1

asp.net-web-api ×1

security ×1