Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am unable to call service.

please help

Client Service
http://localhost:12346/PrimaryRestfulToDb.svc/JSON/PostMailToClient/Data?ClientID=1&Email=yogesh.yadav@ml.com[^]


WCF rest Service

C#
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "PostMailToClient/Data?ClientID={ClientID}&Email={Email}", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
         public Stream PostMailToClient(string ClientID, string Email)
         {
             DataSet ds;
             DataAccessLibrary.clsDAL objEmail = new DataAccessLibrary.clsDAL();
             ds = objEmail.PostMailToClient(ClientID, Email);
             RestfulPrimaryServiceDatabase.Classes.clsClients objEmailClient = new Classes.clsClients();
             return dsEmailAPIToJSON(ds);
         }
Posted
Updated 24-Mar-15 20:57pm
v2
Comments
Rajat_RJT 26-Mar-15 1:33am    
what error you are getting?
yogesh kumar14 26-Mar-15 2:03am    
Method is not allowed
Rajat_RJT 27-Mar-15 5:40am    
You are hitting the request from client with GET method,not POST.
Check your service on rest client using POST method.
REST client addon for mozilla - http://restclient.net/
REST client addon for chrome - https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900