Internal Server Error (500) in Upload File method

Discussion in 'ASP General' started by Pedro Carvalho, Sep 23, 2004.

  1. 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, Sep 23, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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], Sep 23, 2004
    #2
    1. Advertising

  3. 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" <> wrote in message
    > news:...
    > >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, Sep 24, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Bonds
    Replies:
    2
    Views:
    2,749
    Amaryllis
    Aug 3, 2004
  2. P.Belo
    Replies:
    0
    Views:
    839
    P.Belo
    Sep 23, 2004
  3. Replies:
    5
    Views:
    80,208
    cpdarkman
    Aug 26, 2009
  4. BobbyOwens
    Replies:
    0
    Views:
    4,636
    BobbyOwens
    Jan 23, 2009
  5. Replies:
    0
    Views:
    759
Loading...

Share This Page