Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# StatusCode:404,从C调用webapi时的短语:“找不到”_C#_Asp.net Web Api - Fatal编程技术网

C# StatusCode:404,从C调用webapi时的短语:“找不到”

C# StatusCode:404,从C调用webapi时的短语:“找不到”,c#,asp.net-web-api,C#,Asp.net Web Api,当我在本地主机上托管webapi并试图调用它时,我使用webapi。它工作正常,但当我将其托管到域服务器时,它返回:StatusCode:404,ReasonPhrase:“找不到” 但结果是: {StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Connection: Keep-Alive Date: Sun, 07 S

当我在本地主机上托管webapi并试图调用它时,我使用webapi。它工作正常,但当我将其托管到域服务器时,它返回:StatusCode:404,ReasonPhrase:“找不到”

但结果是:

{StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: Keep-Alive
  Date: Sun, 07 Sep 2014 14:19:28 GMT
  Server: Microsoft-IIS/8.0
  X-Powered-By: ASP.NET
  Content-Length: 1245
  Content-Type: text/html
}}

我认为website.com之前的前缀名称“xyz”有问题

它可能会发布到+api/Store。是否打算在其中使用API/API?您是对的,它可以正常工作,谢谢:
{StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: Keep-Alive
  Date: Sun, 07 Sep 2014 14:19:28 GMT
  Server: Microsoft-IIS/8.0
  X-Powered-By: ASP.NET
  Content-Length: 1245
  Content-Type: text/html
}}