ASP.NET MVC 4的WebAPI支持多种HttpConfigurations [英] ASP.NET MVC 4 WebApi Support For Multiple HttpConfigurations

查看:172
本文介绍了ASP.NET MVC 4的WebAPI支持多种HttpConfigurations的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WepApi 6,我们被路过的配置路线上利用多种配置选项:

In WepApi 6 we were making use of multiple configuration options by passing the config on the route:

RouteTable.Routes.MapServiceRoute<UserService>("1.0/User/", defaultWebApiConfiguration);
RouteTable.Routes.MapServiceRoute<SomeOtherService>("1.0/SomeOtherService/", largeFilesConfig);

在哪里像MAXBUFFERSIZE,MaxReceivedMessageSize和TransferMode分别设置正确设置。我怎样才能acheive使用ASP.NET托管的应用程序一样的效果?

Where things like "MaxBufferSize", "MaxReceivedMessageSize", and "TransferMode" were set set appropriately. How can I acheive the same effect using an ASP.NET hosted application?

推荐答案

您不能在瞬间。你可以自我主机上创建多个主机,但在MVC托管目前只有一个配置。

You can't at the moment. You can create multiple hosts in self-host but in MVC hosted there currently is just one config.

这篇关于ASP.NET MVC 4的WebAPI支持多种HttpConfigurations的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆