Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

Internal Server Error (500) in Upload File method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pedro Carvalho - 25 Sep 2004 17:39 GMT
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, 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 using a different server and call it from the
WebClient.UploadFile method:
 
WebClient.UploadFile("http://srv1/ASPPostFile/Upld.aspx","POST",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.Exception 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
Pedro Carvalho - 26 Sep 2004 15:37 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.