I have an ASP MVC 3 site that allows a user to submit some helpdesk information. I also have a client app (WPF) that users should be able to submit helpdesk information from. I would like to just do a HTTP POST to the same form that the user would use via the web site.
Is this possible? I’ve tried using RestSharp but I keep getting a 401.2 from my site.
Thoughts?
My MVC controller action is something like:
//
// POST: helpdesk/submit
[HttpPost]
public ActionResult Submit(HelpDeskRequest helpDeskRequest)
{
}
You could use a WebClient to POST values to your controller action:
and inside the action you will get: