I am using a WebClient.Uploa d File method on the Client side and, to accept
posted files on the Server side, I am using an ASP.NET page with the
following code:
void Page_Load(objec t sender, EventArgs e)
{
foreach(string f in Request.Files.A llKeys)
{
HttpPostedFile file = Request.Files[f];
file.SaveAs("c: \\WUTemp\\" + file.FileName);
}
}
When Client and Server side are on the same machine (localhost/127.0.0.1)
everything runs ok but when using a different server and call it from the
WebClient.Uploa dFile method:
WebClient.Uploa dFile("http://srv1/ASPPostFile/Upld.aspx","POS T",fileToUpload ),
it returns the error: "(500) Internal Server Error". I've already tried to
solve this problem with all the instructions I found in Microsoft and MSDN
but with no results.
Is there any way to have a more detailed error when using 'catch
(System.Excepti on ex)' ?
I have no idea what to try now and I would appreciate if someone could help
me to follow in the right direction.
Thanks for your help
P.Carvalho
posted files on the Server side, I am using an ASP.NET page with the
following code:
void Page_Load(objec t sender, EventArgs e)
{
foreach(string f in Request.Files.A llKeys)
{
HttpPostedFile file = Request.Files[f];
file.SaveAs("c: \\WUTemp\\" + file.FileName);
}
}
When Client and Server side are on the same machine (localhost/127.0.0.1)
everything runs ok but when using a different server and call it from the
WebClient.Uploa dFile method:
WebClient.Uploa dFile("http://srv1/ASPPostFile/Upld.aspx","POS T",fileToUpload ),
it returns the error: "(500) Internal Server Error". I've already tried to
solve this problem with all the instructions I found in Microsoft and MSDN
but with no results.
Is there any way to have a more detailed error when using 'catch
(System.Excepti on ex)' ?
I have no idea what to try now and I would appreciate if someone could help
me to follow in the right direction.
Thanks for your help
P.Carvalho
Comment