WebApi method with email address parameter returns 404 from HttpClient

前端 未结 4 1444
盖世英雄少女心
盖世英雄少女心 2021-01-01 10:32

I have a WebApi controller with a method that looks like such:

[HttpGet]
[AcceptVerbs(\"GET\")]
public HttpResponseMessage Run(string reportName, int someId,         


        
4条回答
  •  太阳男子
    2021-01-01 11:04

    This is because IIS is trying to map special characters. Adding the following to the web.config should fix the issue:

      
         
    
    

    More information here: http://www.iis.net/configreference/system.webserver/modules

提交回复
热议问题