How do you get or save a file from/to a client (button on web page) once they are authenticated? Th

Discussion in 'ASP .Net' started by jake, Jul 7, 2004.

  1. jake

    jake Guest

    How do you get or save a file from/to a client (button on web page) once
    they are authenticated? The client could be Mac, Linux or Windows. Can I do
    it all with IIS and ASP.NET?
    jake, Jul 7, 2004
    #1
    1. Advertising

  2. To send a file to the client it can be as simple as redirecting them to the
    file with code like this:
    Response.Redirect("SomeFile.doc")

    To allow the user to upload a file to your server, you can use the file
    upload control on your toolbar, or type it into the HTML manually:
    <input type=file id=myFile runat=server />

    These articles provide working examples for you:
    http://steve.orr.net/content/asp200307so_f.asp
    http://aspalliance.com/das/tutorial/fileupload.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "jake" <> wrote in message
    news:...
    > How do you get or save a file from/to a client (button on web page) once
    > they are authenticated? The client could be Mac, Linux or Windows. Can I

    do
    > it all with IIS and ASP.NET?
    >
    >
    Steve C. Orr [MVP, MCSD], Jul 7, 2004
    #2
    1. Advertising

  3. jake

    jake Guest

    Thanks Steve,

    This HTML server control, will give a text box and browse button, and it
    will work on all platforms/web browsers (Mac, Linux, Windows)?

    Also, how can I get this file to be uploaded automatically every so often /
    days? Would the browser have to be run minimized after the initial file
    info was taken and the 'button' pressed? Could the browser auto-open
    minimized and send the file or something?


    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > To send a file to the client it can be as simple as redirecting them to

    the
    > file with code like this:
    > Response.Redirect("SomeFile.doc")
    >
    > To allow the user to upload a file to your server, you can use the file
    > upload control on your toolbar, or type it into the HTML manually:
    > <input type=file id=myFile runat=server />
    >
    > These articles provide working examples for you:
    > http://steve.orr.net/content/asp200307so_f.asp
    > http://aspalliance.com/das/tutorial/fileupload.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "jake" <> wrote in message
    > news:...
    > > How do you get or save a file from/to a client (button on web page) once
    > > they are authenticated? The client could be Mac, Linux or Windows. Can

    I
    > do
    > > it all with IIS and ASP.NET?
    > >
    > >

    >
    >
    jake, Jul 7, 2004
    #3
  4. jake

    Marina Guest

    You will not be able to have the file reuploaded automatically. It can only
    happen when the user manually performs an action (such as clicking the
    button). Otherwise this would be a major security hole, as web sites could
    upload user files at will.

    "jake" <> wrote in message
    news:...
    > Thanks Steve,
    >
    > This HTML server control, will give a text box and browse button, and it
    > will work on all platforms/web browsers (Mac, Linux, Windows)?
    >
    > Also, how can I get this file to be uploaded automatically every so often

    /
    > days? Would the browser have to be run minimized after the initial file
    > info was taken and the 'button' pressed? Could the browser auto-open
    > minimized and send the file or something?
    >
    >
    > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > news:...
    > > To send a file to the client it can be as simple as redirecting them to

    > the
    > > file with code like this:
    > > Response.Redirect("SomeFile.doc")
    > >
    > > To allow the user to upload a file to your server, you can use the file
    > > upload control on your toolbar, or type it into the HTML manually:
    > > <input type=file id=myFile runat=server />
    > >
    > > These articles provide working examples for you:
    > > http://steve.orr.net/content/asp200307so_f.asp
    > > http://aspalliance.com/das/tutorial/fileupload.aspx
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD, MVP
    > > http://Steve.Orr.net
    > >
    > >
    > > "jake" <> wrote in message
    > > news:...
    > > > How do you get or save a file from/to a client (button on web page)

    once
    > > > they are authenticated? The client could be Mac, Linux or Windows.

    Can
    > I
    > > do
    > > > it all with IIS and ASP.NET?
    > > >
    > > >

    > >
    > >

    >
    >
    Marina, Jul 7, 2004
    #4
  5. Yes, the standard HTML file upload control *should* work in all browsers,
    but you should (always) test your web sites with the platforms you choose to
    support.

    As for getting the upload to happen automatically, that's a whole different
    can of worms involving plenty of security hoops. I know I wouldn't want you
    downloading files off my computer whenever you feel like it. (Nothing
    personal.)
    You'll need a thick client of some kind to pull that off, such as a full
    blown .NET Windows Forms application or a Windows Service. And obviously
    those are not cross platform.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net



    "jake" <> wrote in message
    news:...
    > Thanks Steve,
    >
    > This HTML server control, will give a text box and browse button, and it
    > will work on all platforms/web browsers (Mac, Linux, Windows)?
    >
    > Also, how can I get this file to be uploaded automatically every so often

    /
    > days? Would the browser have to be run minimized after the initial file
    > info was taken and the 'button' pressed? Could the browser auto-open
    > minimized and send the file or something?
    >
    >
    > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > news:...
    > > To send a file to the client it can be as simple as redirecting them to

    > the
    > > file with code like this:
    > > Response.Redirect("SomeFile.doc")
    > >
    > > To allow the user to upload a file to your server, you can use the file
    > > upload control on your toolbar, or type it into the HTML manually:
    > > <input type=file id=myFile runat=server />
    > >
    > > These articles provide working examples for you:
    > > http://steve.orr.net/content/asp200307so_f.asp
    > > http://aspalliance.com/das/tutorial/fileupload.aspx
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD, MVP
    > > http://Steve.Orr.net
    > >
    > >
    > > "jake" <> wrote in message
    > > news:...
    > > > How do you get or save a file from/to a client (button on web page)

    once
    > > > they are authenticated? The client could be Mac, Linux or Windows.

    Can
    > I
    > > do
    > > > it all with IIS and ASP.NET?
    > > >
    > > >

    > >
    > >

    >
    >
    Steve C. Orr [MVP, MCSD], Jul 7, 2004
    #5
  6. jake

    jake Guest

    So a Timer event would not work, if the browser stayed open? (I have to get
    a file daily) using SSL somehow over http. I thought that would be the
    easiest solution.

    "Marina" <> wrote in message
    news:%23%...
    > You will not be able to have the file reuploaded automatically. It can

    only
    > happen when the user manually performs an action (such as clicking the
    > button). Otherwise this would be a major security hole, as web sites

    could
    > upload user files at will.
    >
    > "jake" <> wrote in message
    > news:...
    > > Thanks Steve,
    > >
    > > This HTML server control, will give a text box and browse button, and it
    > > will work on all platforms/web browsers (Mac, Linux, Windows)?
    > >
    > > Also, how can I get this file to be uploaded automatically every so

    often
    > /
    > > days? Would the browser have to be run minimized after the initial file
    > > info was taken and the 'button' pressed? Could the browser auto-open
    > > minimized and send the file or something?
    > >
    > >
    > > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > > news:...
    > > > To send a file to the client it can be as simple as redirecting them

    to
    > > the
    > > > file with code like this:
    > > > Response.Redirect("SomeFile.doc")
    > > >
    > > > To allow the user to upload a file to your server, you can use the

    file
    > > > upload control on your toolbar, or type it into the HTML manually:
    > > > <input type=file id=myFile runat=server />
    > > >
    > > > These articles provide working examples for you:
    > > > http://steve.orr.net/content/asp200307so_f.asp
    > > > http://aspalliance.com/das/tutorial/fileupload.aspx
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD, MVP
    > > > http://Steve.Orr.net
    > > >
    > > >
    > > > "jake" <> wrote in message
    > > > news:...
    > > > > How do you get or save a file from/to a client (button on web page)

    > once
    > > > > they are authenticated? The client could be Mac, Linux or Windows.

    > Can
    > > I
    > > > do
    > > > > it all with IIS and ASP.NET?
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    jake, Jul 7, 2004
    #6
  7. jake

    Marina Guest

    No, a Timer is a .NET Framework class (unless you are referring to something
    else), which would be useless anyway, as the server can fire all the events
    from a Timer it wants, there is no way to get anything over to the client
    after the initial request, as HTTP is stateless.

    And as I (and Steve) said previously, if there was anyway to do it, it would
    be a major security hole.

    "jake" <> wrote in message
    news:eu%...
    > So a Timer event would not work, if the browser stayed open? (I have to

    get
    > a file daily) using SSL somehow over http. I thought that would be the
    > easiest solution.
    >
    > "Marina" <> wrote in message
    > news:%23%...
    > > You will not be able to have the file reuploaded automatically. It can

    > only
    > > happen when the user manually performs an action (such as clicking the
    > > button). Otherwise this would be a major security hole, as web sites

    > could
    > > upload user files at will.
    > >
    > > "jake" <> wrote in message
    > > news:...
    > > > Thanks Steve,
    > > >
    > > > This HTML server control, will give a text box and browse button, and

    it
    > > > will work on all platforms/web browsers (Mac, Linux, Windows)?
    > > >
    > > > Also, how can I get this file to be uploaded automatically every so

    > often
    > > /
    > > > days? Would the browser have to be run minimized after the initial

    file
    > > > info was taken and the 'button' pressed? Could the browser auto-open
    > > > minimized and send the file or something?
    > > >
    > > >
    > > > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > > > news:...
    > > > > To send a file to the client it can be as simple as redirecting them

    > to
    > > > the
    > > > > file with code like this:
    > > > > Response.Redirect("SomeFile.doc")
    > > > >
    > > > > To allow the user to upload a file to your server, you can use the

    > file
    > > > > upload control on your toolbar, or type it into the HTML manually:
    > > > > <input type=file id=myFile runat=server />
    > > > >
    > > > > These articles provide working examples for you:
    > > > > http://steve.orr.net/content/asp200307so_f.asp
    > > > > http://aspalliance.com/das/tutorial/fileupload.aspx
    > > > >
    > > > > --
    > > > > I hope this helps,
    > > > > Steve C. Orr, MCSD, MVP
    > > > > http://Steve.Orr.net
    > > > >
    > > > >
    > > > > "jake" <> wrote in message
    > > > > news:...
    > > > > > How do you get or save a file from/to a client (button on web

    page)
    > > once
    > > > > > they are authenticated? The client could be Mac, Linux or

    Windows.
    > > Can
    > > > I
    > > > > do
    > > > > > it all with IIS and ASP.NET?
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Marina, Jul 7, 2004
    #7
    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. shapper
    Replies:
    2
    Views:
    582
    shapper
    Feb 22, 2007
  2. subhadip
    Replies:
    0
    Views:
    617
    subhadip
    Mar 28, 2007
  3. gnewsgroup
    Replies:
    1
    Views:
    756
    bruce barker
    Dec 20, 2007
  4. bthumber
    Replies:
    0
    Views:
    363
    bthumber
    Jul 6, 2010
  5. Abhijit
    Replies:
    0
    Views:
    144
    Abhijit
    Apr 12, 2004
Loading...

Share This Page