Why am I getting this error msg? {"Message":"No HTTP resource was found that matches the request URI 'http://www.test.com:7043/API/RunningValue_Import'.","MessageDetail":"No action was found on the controller 'RunningValue_Import' that matches the request."}
Here is the code:
public class RunningValue_ImportController : ApiController
{
string temp001 = ""; //breakpoint here but it wont enter into the function below
// POST api/RunningValue_Import
public object PostRunningValue_Import(string xml)
{
string temp = String.Empty;
try
{
temp = xml;
}
catch (Exception ee)
{
return new { isError = true, Msg = ee.ToString() };
}
return new { isError = false, Msg = "successful." };
}
}
Fiddler:
POST http: //www.test.com:7043/API/RunningValue_Import HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://www.test.com:7043/Html/cURL.html
Accept-Language: en-US
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0; ATT)
Host: www.test.com:7043
Content-Length: 12
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
xml=WhateverStringGoesHere
Any ideas? Thanks