473,324 Members | 2,002 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,324 software developers and data experts.

Read a file from the client side

Hi:

¿How can I read a file on the client side without loading it to the server?
Aug 18 '08 #1
3 2374
"Laura" <le*****@newsgroups.nospamwrote in message
news:O2**************@TK2MSFTNGP03.phx.gbl...
¿How can I read a file on the client side without loading it to the
server?
Natively, you can't - all modern browsers are designed specifically to
prevent this type of direct interface with the hardware / software on the
client machine.

Your only hope would be to use / write an ActiveX control. However, this
would restrict your app to Microsoft IE, and would mean that you would have
to seriously ramp down your security just to get it to run - I can't
recommend it...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 18 '08 #2
Hi Laura,

As Mark mentioned, it's unsafe to read files directly from the client side.
A malicious web site can easily steal your private information if it's
allowed.

Mark raised two drawbacks when using ActiveX:
1. ActiveX can only work for IE users.
2. The user has to run the risk of allowing web sites to read all his local
files.

It's true. I think a better solution is to use a cross-browser plug-in. For
example, we can use Silverlight (it's still in Beta but will be released
soon). In Silverlight we can read/write files in the Isolated Storage,
which is a data storage mechanism that provides isolation and safety. The
default quota of the storage is 1MB. The program can only read/write files
in the Isolated Storage. Thus the two drawbacks are eliminated.

To get started, please install following tools first:
Microsoft Silverlight Tools Beta 2 for Visual Studio 2008:
http://www.microsoft.com/downloads/d...C01-267B-4521-
B7D7-C0DBA8866434&displaylang=en

How to use Isolated Storage:
http://silverlight.net/quickstarts/Other/StoreData.aspx

Please feel free to let me know if you need further assistance. You can
also ask questions in the Silverlight forum:
http://silverlight.net//forums/

Regards,
Allen Chen
Microsoft Online Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Reply-To: "Laura" <lm*******@bch.hn>
| From: "Laura" <le*****@newsgroups.nospam>
| Subject: Read a file from the client side
| Date: Mon, 18 Aug 2008 10:36:45 -0600
| Lines: 5
| Organization: BCH
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
| Message-ID: <O2**************@TK2MSFTNGP03.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 204.249.102.203
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP03.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:74138
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi:
|
| ¿How can I read a file on the client side without loading it to the
server?
|
|
|

Aug 19 '08 #3
Hi Laura,

Is this problem solved? Please feel free to let me know if you need further
assistance.

Regards,
Allen Chen
Microsoft Online Community Support
--------------------
| Reply-To: "Laura" <lm*******@bch.hn>
| From: "Laura" <le*****@newsgroups.nospam>
| Subject: Read a file from the client side
| Date: Mon, 18 Aug 2008 10:36:45 -0600
| Lines: 5
| Organization: BCH
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
| Message-ID: <O2**************@TK2MSFTNGP03.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 204.249.102.203
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP03.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:74138
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi:
|
| ¿How can I read a file on the client side without loading it to the
server?
|
|
|

Aug 26 '08 #4

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

Similar topics

4
by: Marcel Brekelmans | last post by:
Hi, This is my situation: My ISP doesn't allow me the execute server-code. So, no ASP or otherwise.As a small compensation, they run some CGI scripts that we can use. With one of these...
7
by: Nik Coughin | last post by:
Is there a simple way of opening a text file from a server, and reading from it line by line? IE http://someserver/file.txt contains a couple of hundred lines. Each line is the name of a...
21
by: ryanmhuc | last post by:
I know the subject might be confusing. I am no beginner with javascript but I haven't been able to figure out how to get the javascript file name from code inside the file. So you have an HTML...
4
by: Michael | last post by:
I am trying to open a file on the client machine from an aspx page running server side. The design requirements of the page specify that the HtmlInputFile control is not to be used. Since the...
2
by: polabear | last post by:
I'm converting a VB6/SQL Server application to a web application. I need to read data to and from Excel and Word. I'm not allowed to install Excel and Word on the server, only on the client. Is...
6
by: dinoo | last post by:
Hi, I would appreciate if some one could help me out. I have to read a client side ini file in Aspx page and use that data in server side processing. Can any one help me out here? Please refer...
4
by: Ross | last post by:
Hello, I am trying to Read and Write to a text file on a web server using Microsoft Visual Basic 2005 Express Edition. So far I have managed to complete my testing with a local text file using...
14
by: Peter | last post by:
..NET 3.5 I have a Windows Service application and it does remoting, but when a client incounters an error the client get the following error message "Server encountered an internal error....
6
by: Peter | last post by:
I have a WebService which returns a List of RunningReport class How do I read this XML data on the client side. How do I convert List<RunningReportfrom the WebService side to List<RunningReporton...
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
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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.