Read text file from the client terminal

How do i read a text file from client machine
and fill the form which has textboxes and date fields with the contents of the text file. Please advice me with the asp script.

Who is Participating?
kikkertmConnect With a Mentor Commented:
It all depends if you have control over your clients. On an intranet it would be possible if you set the security settings of all your clients very low.

The filesystemobject is an 'unsafe' object and cannot be just instanciated on the client without all kinds of warning boxes popping up !

What are you actually trying to achieve ?
sureshrao72 ,

This is not easy to do, I would be a security problem if you could read files on the client !

djmcraeConnect With a Mentor Commented:
As kikkertm has said - the browser cannot read the clients hard drive to transmit data back to your server. The usual Java applets also operate within this sandbox.

If you must do this, you need to create either an ActiveX object (using C++,VB or my favourite Delphi - clients must be Wintel boxes) or an 'unsafe' Java Applet (I've not tried the Java way).

These are fine if you are developing for an intranet and all clients trust your server. Its really not an option for the internet - most browsers will not by default allow unsigned objects, and prompt the user for a 'signed' object. A 'signed' object requires to to purchase a certification from a certification authoity such as Verisign or Thwate.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

just for curiositys sake, wasn't there a bug in the scripting file system object that would allow a dynamically created asp script to see the local client machien as the server, or hosting machine, and so allow access to the local file system?

i'm not posting this as a solution, just ... well, just for fun.. he he he
sureshrao72Author Commented:
Using filesystemobject we can read any text file i guess,
we can grab the contents in a vbscript variable and then fill the form the the variable, is'nt possible

No comment has been added lately (more than a year now), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question.

RECOMMENDATION: Split points to djmcrae and kikkertm.

Please leave any comments here within seven days.



EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.