WebApi method with email address parameter returns 404 from HttpClient

前端 未结 4 1447
盖世英雄少女心
盖世英雄少女心 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:12

    Adding the following to the web.config should not fix the complete issue:

      
         
    
    

    The solution no longer works as an extra path segment is used in the uri for me. https://localhost:xxxx/user@domain.com does work

    https://localhost:xxxx/path/user@domain.com does not work

    I google around and around and i understood that it is an extension. (.cs gives a different error as .com) and finaly find this: ASP.net MVC4 WebApi route with file-name in it

    My solution was to add or change the following handler in the section of your :

    
    
    

    or change the path to path=*@*.*

提交回复
热议问题