I have tried using the same way
HttpFileCollection hfc;
HttpPostedFile hpf;
hfc = Request.Files;
for (int i = 0; i < hfc.Count; i++)
{
hpf = hfc[i];
if (hpf.ContentLength > 0)
{
code
}
}
In local it is working fine.
But in godaddy server error displaying as
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.