Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > 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.

Reply
Thread Tools

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.

 
 
jake
Guest
Posts: n/a
 
      07-07-2004
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?


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      07-07-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
 
jake
Guest
Posts: n/a
 
      07-07-2004
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]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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?
> >
> >

>
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      07-07-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      07-07-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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?
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
jake
Guest
Posts: n/a
 
      07-07-2004
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" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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]" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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?
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      07-07-2004
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" <(E-Mail Removed)> wrote in message
news:eu%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%23%(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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]" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > 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" <(E-Mail Removed)> wrote in message
> > > > news:(E-Mail Removed)...
> > > > > 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?
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you read the attachment once you get the file? bthumber ASP .Net 0 07-06-2010 04:17 PM
Re: ATTN: Aardvark they are locking in on your Linux security blanket.You can run, but you can't hide from it. Mike Easter Computer Support 5 04-22-2010 04:21 PM
Re: ATTN: Aardvark they are locking in on your Linux securityblanket. You can run, but you can't hide from it. Aardvark Computer Support 3 04-22-2010 02:20 PM
When they're gone, they could be gone for good... Richard DVD Video 10 06-02-2004 07:13 AM
they turn, they power, they make nice pics Keith and Jenn Z. Digital Photography 0 09-21-2003 04:16 AM



Advertisments