Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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()


    cedced Guest

  2. Similar Questions and Discussions

    1. How to send files to client
      Hi, Does anyone know how to send a file to the client from Flex. My scenario is this: 1) Pass some parameters to java layer 2) Java layer...
    2. client can't publish files with 4.0
      I'll first start by saying that my client has been happily editing and publishing files since February. Recently, she was on vacation so I made a...
    3. Flash Webcam client <-> client (not client <-> server<-> client)
      Dear Flash Team, supporter and regular mortals (Like myself) I am currently running a IRC chat with mostly webclients connected. We currently offer...
    4. XP Client can't access Win2K-files
      Hi ! We have a problem when trying to access files from an XP client on a Win2000 server (Server2). Server2 is not the Domain controller but is...
    5. Can't see server files on Client PC
      I have a four machine home network. My main ICS PC is a Win2kPro, and all the clients are WinXPHome. On the winxp clients I can see the win2kpro...
  3. #2

    Default Re: files client

    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
    [url]http://www.takempis.com[/url]
    Complex things are made up of
    lots of simple things.

    "cedced" <cedrico_59@yahoo.fr> wrote in message
    news:bhakpk$1mq$1@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()
    >
    >

    Kevin Spencer Guest

  4. #3

    Default Re: files client

    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" <cedrico_59@yahoo.fr> wrote in message
    news:bham9p$2ou$1@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" <james@dotnetcoders.com> a écrit dans le message de
    news:
    > [email]uK3rdqMYDHA.2236@TK2MSFTNGP10.phx.gbl[/email]...
    > > 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
    > > [url]http://www.dotnetcoders.com[/url]
    > >
    > >
    > > "cedced" <cedrico_59@yahoo.fr> wrote in message
    > > news:bhakpk$1mq$1@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()
    > > >
    > > >
    > >
    > >
    >
    >

    James J. Foster Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139