HTMLInputFile Issue

Discussion in 'ASP .Net' started by renor321@yahoo.com, Jun 23, 2006.

  1. Guest

    Hi,

    I'm trying to use an HTMLInputFile control to upload files to a web
    server. When I run this on my local computer (Windows XP, .Net 1.1),
    it works just fine. When I deploy the app to my dev server (Windows
    2003, .Net 1.1), however, I'm unable to get the control to work
    properly. It seems that the file I'm trying to upload doesn't even get
    posted, as the following code always returns TRUE:
    "If ctlUploadFile.PostedFile Is Nothing"
    I've looked all over the usual suspects-The HTML form has
    encType="multipart/form-data", and it looks like IIS is allowing POST
    on aspx pages.
    Any assistance would be greatly appreciated.

    Thanks!

    -Dave-
     
    , Jun 23, 2006
    #1
    1. Advertising

  2. Dave Guest

    I forgot to mention that the web.config file is also set to allow files
    larger than 4 MB. Even so, the files I'm working with are less than 4
    MB.

    Thanks!

    -Dave-

    wrote:
    > Hi,
    >
    > I'm trying to use an HTMLInputFile control to upload files to a web
    > server. When I run this on my local computer (Windows XP, .Net 1.1),
    > it works just fine. When I deploy the app to my dev server (Windows
    > 2003, .Net 1.1), however, I'm unable to get the control to work
    > properly. It seems that the file I'm trying to upload doesn't even get
    > posted, as the following code always returns TRUE:
    > "If ctlUploadFile.PostedFile Is Nothing"
    > I've looked all over the usual suspects-The HTML form has
    > encType="multipart/form-data", and it looks like IIS is allowing POST
    > on aspx pages.
    > Any assistance would be greatly appreciated.
    >
    > Thanks!
    >
    > -Dave-
     
    Dave, Jun 23, 2006
    #2
    1. Advertising

  3. Hi Dave,

    You've probably checked, but are you sure the permissions allow the current
    ASPNET account to write to the file system on the dev server?

    Are you able to catch any error messages?

    Ken
    Microsoft MVP [ASP.NET]

    <> wrote in message
    news:...
    > Hi,
    >
    > I'm trying to use an HTMLInputFile control to upload files to a web
    > server. When I run this on my local computer (Windows XP, .Net 1.1),
    > it works just fine. When I deploy the app to my dev server (Windows
    > 2003, .Net 1.1), however, I'm unable to get the control to work
    > properly. It seems that the file I'm trying to upload doesn't even get
    > posted, as the following code always returns TRUE:
    > "If ctlUploadFile.PostedFile Is Nothing"
    > I've looked all over the usual suspects-The HTML form has
    > encType="multipart/form-data", and it looks like IIS is allowing POST
    > on aspx pages.
    > Any assistance would be greatly appreciated.
    >
    > Thanks!
    >
    > -Dave-
    >
     
    Ken Cox [Microsoft MVP], Jun 24, 2006
    #3
  4. Dave Guest

    Hi Ken,

    Thanks for getting back to me.

    I've given the ASPNET account read/write access to the specific
    directory that it needs to write to. I've also given the Network
    Service account the same rights, as I read somewhere that that account
    might be used as well.

    If I change the code to catch "ctlUploadFile.PostedFile.FileName", I
    get an error message stating that the object reference is not set to an
    instance of an object. It appears that the HTMLInput isn't picking up
    the file at all. I'm completely stumped, as it works on my local
    machine, but not on the Windows 2003 dev server.

    Thanks!

    -Dave-

    Ken Cox [Microsoft MVP] wrote:
    > Hi Dave,
    >
    > You've probably checked, but are you sure the permissions allow the current
    > ASPNET account to write to the file system on the dev server?
    >
    > Are you able to catch any error messages?
    >
    > Ken
    > Microsoft MVP [ASP.NET]
    >
    > <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I'm trying to use an HTMLInputFile control to upload files to a web
    > > server. When I run this on my local computer (Windows XP, .Net 1.1),
    > > it works just fine. When I deploy the app to my dev server (Windows
    > > 2003, .Net 1.1), however, I'm unable to get the control to work
    > > properly. It seems that the file I'm trying to upload doesn't even get
    > > posted, as the following code always returns TRUE:
    > > "If ctlUploadFile.PostedFile Is Nothing"
    > > I've looked all over the usual suspects-The HTML form has
    > > encType="multipart/form-data", and it looks like IIS is allowing POST
    > > on aspx pages.
    > > Any assistance would be greatly appreciated.
    > >
    > > Thanks!
    > >
    > > -Dave-
    > >
     
    Dave, Jun 26, 2006
    #4
    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. bruce barker

    Re: HELP - HtmlInputFile Server Control

    bruce barker, Jul 17, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    377
    bruce barker
    Jul 17, 2003
  2. Paul Hobbs

    Replicate HTMLInputFile functionality

    Paul Hobbs, Aug 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    Paul Hobbs
    Aug 3, 2003
  3. szabelin
    Replies:
    0
    Views:
    482
    szabelin
    Aug 4, 2003
  4. Eric Sabine
    Replies:
    0
    Views:
    351
    Eric Sabine
    Aug 25, 2003
  5. PK

    HtmlInputFile issue

    PK, Jun 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    156
Loading...

Share This Page