脚步:
1. Create empty project, click checkbox for Web API and Test project
(probably optional)
2. In WebApiConfig.cs, clear out Register contents, set to
config.MapHttpAttributeRoutes();
3. Create Controller:
public class TestController
{
[HttpGet("test")]
public string GetVal()
{
return "Testing";
}
}
4. Build and run project
5. Open Fiddler/Postman/etc and go to localhost:port/test -> 404
谁能告诉我如何让这个特定的部分工作?
编辑:
可能应该声明服务器默认是 IIS 8.0 Express