I am trying to have a HTML form post a file to a Asp .Net Web service method. Everything seems to work but there is no form or files on the request object in the web method. any ideas?
Html Form
<form id="formPost" action="service/Post" enctype="multipart/form-data" method="post">
Post File <input id="uploadfile" type=file />
<input type=submit value="Post" />
</form>
Web service
[WebMethod]
public void Post()
{
// file collection of uploaded files in the http context
HttpFileCollection Files = this.Context.Request.Files;
// always 0 and no form either
if (Files.Count > 0)
{}
}