【发布时间】:2017-05-01 18:24:39
【问题描述】:
我正在尝试将新数据添加到我的数据库中,我正在使用 wcf。
这是我的 iServiceRequest.cs
[OperationContract]
[WebInvoke(Method = "POST",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "/InsertData?ticket={ticket}&request={request}&category={category}&subCategory={subCategory}&subject={subject}&body={body}&assignto={assignto}&status={status}&fileName={fileName}&fileContent={fileContent}&fileBinary={fileBinary}&IsActive={IsActive}&createdBy={createdBy}&ACNo={ACNo}")]
IEnumerable<USP_INSERT_DATA_Result> InsertData(string ticket, string request, string category, string subCategory, string subject, string body, string assignto, int status, string fileName, string fileContent, byte[] fileBinary, bool IsActive, string createdBy, int ACNo);
当我尝试使用浏览器发帖时
http://localhost:51458/ServiceRequest.svc/InsertData?ticket=ticket&request=request&category=categor&subCategory=subCategory&subject=subject&body=body&assignto=assignto&status=1&fileName=fileName&fileContent=fileContent&fileBinary=13213&IsActive=1&createdBy=createdBy&ACNo=111
我正在获取服务方法是不允许的,你可以在下面的图片中看到它
提前致谢
【问题讨论】:
标签: angularjs json asp.net-mvc