473,661 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Internal Server Error (500) in Upload File method

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

Nov 21 '05 #1
1 5177
Today i've been looking also to 'www.aspfaq.com ' and tried all their
instructions without any positive result.
I'm trying to solve this for some days now and I don't know what else to do...
Thanks for any help.
P.Carvalho

Nov 21 '05 #2

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

Similar topics

5
10539
by: Moshe | last post by:
Scenario - IIS 5.0 WIN2K latest SP Application ASP. An ASP Page has a text area. When submitted calls SQL server 2K Stored Procedure to update a record. The field in the data base is of type Text. When posting from the browser a text that is less then about 100K, no errors. When posting more the 100K HTTP 500 - Internal server error Tracing the database - the call to SP was not yet executed.
5
8458
by: Ben | last post by:
hi when I try to excecute an ASP (either JS or VB) script to say, access a database record, I get an Internal Server Error HTTP 500.100 Why? and HOW CAN I FIX THIS? Thanks
2
5592
by: Pedro Carvalho | last post by:
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; file.SaveAs("c:\\WUTemp\\" + file.FileName);
1
1946
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 Internal Server Error.Please let me know where went wrong in it. 1.The client has given the credentials(username & password) using those i got conneted to the server successfully,but when i run the below code to upload files
8
10003
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
4
7223
by: Terry | last post by:
Hello, I am trying to get a response for an .aspx page in my current project (same virtual directory) by using WebRequest.GetResponse but I keep getting a exception with "500 Internal server error" in the exception message. I am able to do this fine with another .aspx page that has no code-behind. The page that has code-behind throws the exception. What I am doing is getting the .aspx response, reading the stream, replacing
4
6202
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 pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
1
8497
by: BethH | last post by:
Hello! I'm developing a webpage locally. I originally started it on PHP 5 and XP (where it was working). We've recently changed my machine to a dual boot with most of the important stuff on Vista, so I'm going about getting the page up and working in Vista. It will load the first page without issue, but if I try to get to the second page (or any page other than 'index.php'), it throws a 500 error at me:
3
5932
by: guillaume.braux | last post by:
Hello, I am running WS2008 + IIS7 + FASTCGI + ZendCore. I have not modified the default ZendCore php.ini configuration file. Actualy, any kind of PHP error, warning or notice gives me immediately a IIS 500 Error (Internal Server Error). It is a good thing in production environnement. For debuging purposes, I want temporary to be able to see PHP warnings and errors embedded on the html page.
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7362
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.