我为Web Api 2安装了正确的软件包
Install-Package Microsoft.AspNet.WebApi.HelpPage -Pre
Run Code Online (Sandbox Code Playgroud)
但是帮助区域没有被映射并返回404(Web Api工作正常).我正在使用Microsoft.Owin.Host.SystemWeb作为主机.下面是我的启动代码.
public class Startup
{
public void Configuration(IAppBuilder app)
{
//Required for MVC areas new HttpConfiguration() doesn't work with MVC
var config = GlobalConfiguration.Configuration;
AreaRegistration.RegisterAllAreas();
WepApiStartup.Configure(config);
app.UseWebApi(config);
}
}
Run Code Online (Sandbox Code Playgroud) 与MVC一样,WebApi在异步ASP.NET管道上运行,这意味着不支持执行超时.
在MVC我使用[AsyncTimeout]过滤器,WebApi没有这个.那么如何在WebApi中超时请求?
有谁知道SmtpClientWrapper中的MvcMailer SendAsync方法是否阻止ASP.NET MVC请求?看看MvcMailer维基和代码,我会说是的.
所以,我仍然需要使用像WebBackgrounder作为disussed 这里在我的MVC应用程序安全和真正的异步发送邮件?
我正在寻找一个明确的答案谢谢.