I need to run a Controller Action from my Console Application that reference to my MVC App.
The reason behind this is because there are some special Action method that i cannot just simply copy to the new application. (Because of the control things)
So I just want to ask if there could be any way to call a controller action method from the Console application? How could I send a file upload to the controller?
This is the example of my ActionResult that used to upload a file? how should i send the Request.Files to it?
public ActionResult ImageUp(){
foreach (string fname in Request.Files)
{
HttpPostedFileBase _file = Request.Files[fname];
}
}