When Ever im trying to consume my wcf restful service with Post Method it gives Exception
The remote server returned an error: (404) Not Found.
But when i use Get Method in service it works fine.
Service
[OperationContract]
[WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped, Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "UserLogin/{emailId}/{password}")]
int UserLogin(string emailId, string password);
This is client application
var request = (HttpWebRequest)WebRequest.Create("http://localhost/GMTSService/GMTSService.svc/UserLogin/" + "user1"+ "passowrd");
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
Stream strm = response.GetResponseStream();
StreamReader strmReader = new StreamReader(strm);
string txt = strmReader.ReadToEnd();
Response.Write(txt);
Please Help me to resolve this.

Manas MohapatraRank #182 · 13.2K reputationPosted Jul 23, 2015, 2:49 AM EDT
amrish kumar106 reputationPosted Jul 23, 2015, 2:56 AM EDT
By My Service is worked when im using Get Method in Service.
But it Doesnt work when im trying to use post Method.
Manas MohapatraRank #182 · 13.2K reputationPosted Jul 23, 2015, 3:01 AM EDT
amrish kumar106 reputationPosted Jul 23, 2015, 3:25 AM EDT
amrish kumar106 reputationPosted Jul 23, 2015, 5:27 AM EDT
I was passing int in parameter,
but when i passed the value in string it resolve the error.