473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

files client

Hello,
is it possible to access client files in VB.NET?
What?
I have doing that but it isn't good (VB.NET take file on pc server and not
on pc client):
(thanks)
Dim fichier As StreamReader

Dim name As String

fichier = File.OpenText("C:\liste.txt")

name = fichier.ReadLine()

Response.Write(name)

Do While Not name Is Nothing

name = fichier.ReadLine()

Response.Write(name)

Loop

fichier.Close()
Nov 17 '05 #1
2 2025
Found via Google:

From: Microsoft® Scripting Library - FileSystemObject
.....
Because use of the FSO on the client side raises serious security issues
about providing potentially unwelcome access to a client's local file
system, this documentation assumes use of the FSO object model to create
scripts executed by Internet Web pages on the server side. Since the server
side is used, the Internet Explorer default security settings do not allow
client-side use of the FileSystemObject object. Overriding those defaults
could subject a local computer to unwelcome access to the file system, which
could result in total destruction of the file system's integrity, causing
loss of data, or worse
....
Use of the FSO is possible client-side in IE, provided the user has set
"enable objects not marked as safe for scripting" (or words to that
effect) to "allow" or "prompt".
James
"cedced" <ce********@yahoo.fr> wrote in message
news:bh**********@muguet.sncf.fr...
In fact, i know the fullpath (c:\liste1.txt) on client pc.
But in javascript, i can't using a datagrid.
SO......(I must use datagrid so using vb.net but file is on client pc)
javascript :
v_chemin = ParamValeur(maVariable);
var fs = new ActiveXObject("Scripting.FileSystemObject");
mon_fichier = fs.GetFile(v_chemin).OpenAsTextStream(1);
ligne = mon_fichier.ReadLine();
//REMPLIT DATAGRID
while (mon_fichier.AtEndOfStream==false){
ligne = mon_fichier.ReadLine();
//REMPLIT DATAGRID
}
//BINDLIST
"James J. Foster" <ja***@dotnetcoders.com> a écrit dans le message de news: uK**************@TK2MSFTNGP10.phx.gbl...
From ASP.NET, no, you cannot access the files on the client machine since
that code runs on the server. There would be severe security implications, not to mention technological hurdles, if you could ask the client
browser to
give you any file from the client's machine.

--
James J. Foster, DotNetCoders
http://www.dotnetcoders.com
"cedced" <ce********@yahoo.fr> wrote in message
news:bh**********@muguet.sncf.fr...
Hello,
is it possible to access client files in VB.NET?
What?
I have doing that but it isn't good (VB.NET take file on pc server and

not on pc client):
(thanks)
Dim fichier As StreamReader

Dim name As String

fichier = File.OpenText("C:\liste.txt")

name = fichier.ReadLine()

Response.Write(name)

Do While Not name Is Nothing

name = fichier.ReadLine()

Response.Write(name)

Loop

fichier.Close()



Nov 17 '05 #2
It is possible to access the file system on the client from any web page,
regardless of what is running behind it on the server. However, it can't be
done from the server. There is no connection between the server and the
client. The client sends a message to the server requesting a resource
(usually a file, such as an ASPX page). The server receives the message
(Request), processes it, and sends a message (Response) back to the client,
usually in the form of an HTML document. How then, can the server access
ANYTHING on the client?

How it is possible for any web page in the client browser to access the file
system on the client is by means of a Java Applet or ActiveX control in the
browser (embedded in an HTML document).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.

"cedced" <ce********@yahoo.fr> wrote in message
news:bh**********@muguet.sncf.fr...
Hello,
is it possible to access client files in VB.NET?
What?
I have doing that but it isn't good (VB.NET take file on pc server and not
on pc client):
(thanks)
Dim fichier As StreamReader

Dim name As String

fichier = File.OpenText("C:\liste.txt")

name = fichier.ReadLine()

Response.Write(name)

Do While Not name Is Nothing

name = fichier.ReadLine()

Response.Write(name)

Loop

fichier.Close()

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Frank | last post by:
Hi, is there a way to use XSL to compare two XML files to verify if a "record" in an XML file has changed of parent in another XML file ? I am trying to implement a template in an XSL stylesheet...
3
by: Wade | last post by:
I would like to install the .Net 1.1 framework on a Web Server running W2K to be able to run ASP.NET files, but I'm not sure where to find the files I need for the .Net framework. I have ".NET...
2
by: Sean | last post by:
I have an ASP.NET web application that needs to be rolled out to a number of clients. The functionality is the same in all applications, but each client has its own database. At the moment, I...
3
by: Buddy Ackerman | last post by:
I'm trying to write files directly to the client so that it forces the client to open the Save As dialog box rather than display the file. On some occasions the files are very large (100MB+). On...
5
by: Stanav | last post by:
Hello all, Thanks in advance for any replies... Now, my question is: Is it possible to do a multiple files download for a single response event on an aspx page? If there is, please give me some...
9
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
1
by: moondaddy | last post by:
I have a sample vb .net 2.0 winforms app and am using Oneclick deployment to a remote server. All of the files (DLLs, EXEs, manifests, configs, etc.) seem to get deployed to the target folder on...
0
by: pbd22 | last post by:
Hi. I am having a really tough time here and would appreciate some help. i am using an iFrame to pass a url string of files to upload to server. on the client i have created a multiple...
2
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.