62,046
社区成员
发帖
与我相关
我的任务
分享
<Error>
<Message>
No route providing a controller name was found to match request URI 'http://localhost:26866/api/mms/upload'
</Message>
</Error>
public class MmsAreaRegistration : AreaRegistration
{
public override string AreaName
{
get
{
return "Mms";
}
}
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
this.AreaName + "default",
this.AreaName + "/{controller}/{action}/{id}",
new { area = this.AreaName, controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "Zephyr.Areas."+ this.AreaName + ".Controllers" }
);
GlobalConfiguration.Configuration.Routes.MapHttpRoute(
this.AreaName + "Api",
"api/" + this.AreaName + "/{controller}/{action}/{id}",
new { area = this.AreaName, action = RouteParameter.Optional, id = RouteParameter.Optional, namespaceName = new string[] { string.Format("Zephyr.Areas.{0}.Controllers", this.AreaName) } },
new { action = new StartWithConstraint() }
);
}
}