TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amrish kumar
NA
96
4k
Problems in cosuming wcf Restful Service
Jul 23 2015 6:39 AM
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.
Reply
Answers (
5
)
Wcf restful Service .and when consume it on aspx page
WCF authentication