IIS ASP - Internal Server Error (500) in Upload File method

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > September 2004 > Internal Server Error (500) in Upload File method





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Internal Server Error (500) in Upload File method
Pedro Carvalho

2004-09-23, 9:15 am

I am using a WebClient.Upload File method (using the HTTP POST) 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(object sender, EventArgs e)
{
foreach(string f in Request.Files.AllKeys)
{
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 I use the same ASP.NET page in a different
server, 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. I have no idea what to try now and I would
appreciate if someone could help me to follow in the right direction.
Best Regards
P.Carvalho
Ray Costanzo [MVP]

2004-09-23, 9:15 am

Step 1 would be to find out what the error is. First see this:

http://www.aspfaq.com/show.asp?id=2109

Then see this.

http://www.aspfaq.com/5002

When you post there, you may want to include your <customErrrors> snippet
from your web.config file.

Ray at home

"Pedro Carvalho" <PedroCarvalho@discussions.microsoft.com> wrote in message
news:63CE4E15-DE8A-4F59-B52D-980385644796@microsoft.com...
>I am using a WebClient.Upload File method (using the HTTP POST) 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(object sender, EventArgs e)
> {
> foreach(string f in Request.Files.AllKeys)
> {
> 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 I use the same ASP.NET page in a different
> server, 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. I have no idea what to try now and I would
> appreciate if someone could help me to follow in the right direction.
> Best Regards
> P.Carvalho



Pedro Carvalho

2004-09-24, 7:48 am

Ok, Ray. Thanks for your help. I have now a direction to search.
P.Carvalho

"Ray Costanzo [MVP]" wrote:

> Step 1 would be to find out what the error is. First see this:
>
> http://www.aspfaq.com/show.asp?id=2109
>
> Then see this.
>
> http://www.aspfaq.com/5002
>
> When you post there, you may want to include your <customErrrors> snippet
> from your web.config file.
>
> Ray at home
>
> "Pedro Carvalho" <PedroCarvalho@discussions.microsoft.com> wrote in message
> news:63CE4E15-DE8A-4F59-B52D-980385644796@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com