I’m getting this error while trying to post data to a hosted web application from a windows service.
PostSubmitter post = new PostSubmitter();
post.Url = "http://192.168.0.1/Invoice/Invoice1.aspx";
post.PostItems.Add("subscriberid", subscriberid.ToString());
post.PostItems.Add("StartDate", StartDate);
post.PostItems.Add("EndDate", EndDate);
post.PostItems.Add("AdvanceBillDate", AdvanceBillDate);
post.Type = PostSubmitter.PostTypeEnum.Post;
try
{
string res = post.Post();
}
catch (Exception exp)
{
}
This is code snippet of my windows service which posts data to web application.
Does any one know the reason.I’m using asp .Net C#
Finally i got wat was missing.Actually i was posting data to the web application and reading it using Request.QueryString……Which is actually how Get Method is read.So modified my code as