473,419 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Internal Server Error (500) in Upload File method

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
Jul 19 '05 #1
2 5561
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" <Pe***********@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.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

Jul 19 '05 #2
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" <Pe***********@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.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


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: vighneswar | last post by:
Hi All I am working on a project in which i have to upload files to an remote server via HTTPS. For that i have written the following lines of code,but when i execute it I am getting an HTTP:500...
1
by: Pedro Carvalho | last post by:
I am using a WebClient.Upload 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(object sender,...
1
by: vighneswar | last post by:
Hi All I am working on a project in which i have to upload files to an remote server via HTTPS. For that i have written the following lines of code,but when i execute it I am getting an HTTP:500...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.