【发布时间】:2014-02-17 14:16:10
【问题描述】:
我有一个接受一个参数的网络服务。
Web服务方法:
[ActionName("GetCustomers")]
[HttpPost]
[AcceptVerbs("GET","HEAD")]
public bool getcustomers(string id)
{
var result = JsonConvert.DeserializeObject<RootObject>(id.ToString());
using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\Result.txt"))
{
file.WriteLine(result);
}
return false;
}
如果我在提琴手的 url 下面运行..GetCustomer 方法正在调用....
url : http://localhost:49809/Import/GetCustomers/test
如果我通过屏幕截图中的 json 格式;
我的 webmethod 没有调用..让我知道为什么如果传递 json 格式它没有调用..给出错误:HTTP/1.1 404 Not Found
【问题讨论】:
标签: web-services fiddler