I have a web app that needs to parse through a file that is located on the
client machine. I get the file string from a query string & then parse it.
It is working fine on my development box but when I put it out on the test
server the application is looking for the file on the server & not on the
client machine.
I am essentially taking the query string & using a stream reader to read the
file.
I'm sure i'm doing something whacky...so PLEASE set me straight!
Steve. 20 2010
Browser security is going to prevent you from reading/writing
local files on the visitors PC. You are SOL unless you
write an ActiveX control, get the users to install it, and then
have them set their browser security settings to essentially
non-existant security.
--
2004 and 2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.masterado.net/home/listings.aspx
"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:0A******** *************** ***********@mic rosoft.com... I have a web app that needs to parse through a file that is located on the client machine. I get the file string from a query string & then parse it. It is working fine on my development box but when I put it out on the test server the application is looking for the file on the server & not on the client machine.
I am essentially taking the query string & using a stream reader to read the file.
I'm sure i'm doing something whacky...so PLEASE set me straight!
Steve.
I do have control over the clients....i mean I can have the clients give
access to aspnet to a specific folder, etc... would this help?
"Steve" wrote: I have a web app that needs to parse through a file that is located on the client machine. I get the file string from a query string & then parse it. It is working fine on my development box but when I put it out on the test server the application is looking for the file on the server & not on the client machine.
I am essentially taking the query string & using a stream reader to read the file.
I'm sure i'm doing something whacky...so PLEASE set me straight!
Steve.
Nothing to do with ASP.NET. You'd have to lower each of
their security settings in the browser to the lowest level possible.
Even then, the browser might not enable you to do this.
Why is it that you need to read/write a local file? Perhaps
you can achieve your goal another way.
--
2004 and 2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.masterado.net/home/listings.aspx
"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:8C******** *************** ***********@mic rosoft.com... I do have control over the clients....i mean I can have the clients give access to aspnet to a specific folder, etc... would this help?
"Steve" wrote:
I have a web app that needs to parse through a file that is located on the client machine. I get the file string from a query string & then parse it. It is working fine on my development box but when I put it out on the test server the application is looking for the file on the server & not on the client machine.
I am essentially taking the query string & using a stream reader to read the file.
I'm sure i'm doing something whacky...so PLEASE set me straight!
Steve.
Ya.... a local file on the clients machine. I can't install anything to the
clients machine & the HTML file input control won't work either because we
don't want the users to search for the file...which is why it's getting
passed in the query string.
Any ideas?
"Robbe Morris [C# MVP]" wrote: Nothing to do with ASP.NET. You'd have to lower each of their security settings in the browser to the lowest level possible. Even then, the browser might not enable you to do this.
Why is it that you need to read/write a local file? Perhaps you can achieve your goal another way.
-- 2004 and 2005 Microsoft MVP C# Robbe Morris http://www.robbemorris.com http://www.masterado.net/home/listings.aspx "Steve" <St***@discussi ons.microsoft.c om> wrote in message news:8C******** *************** ***********@mic rosoft.com...I do have control over the clients....i mean I can have the clients give access to aspnet to a specific folder, etc... would this help?
"Steve" wrote:
I have a web app that needs to parse through a file that is located on the client machine. I get the file string from a query string & then parse it. It is working fine on my development box but when I put it out on the test server the application is looking for the file on the server & not on the client machine.
I am essentially taking the query string & using a stream reader to read the file.
I'm sure i'm doing something whacky...so PLEASE set me straight!
Steve.
Steve, Ya.... a local file on the clients machine. I can't install anything to the clients machine & the HTML file input control won't work either because we don't want the users to search for the file...which is why it's getting passed in the query string.
Microsoft has taken maybe hundreds of millions or more in this to make it
impossible to do what you want. You want an easy solution to do this.
Just my thought,
Cor
So is there no way to set the text for the File field? Even using Java
Script? Maybe hiding the file field & setting the text & then loading
that... I don't really care where I parse the file at...I could parse it
after I upload it...the main objective is to not allow the user to have to go
& select a file because the file is being passed by another application & our
users aren't very smart...we don't want them to try to find the file.
So how about some alternatives rather than Microsoft spending millions to
not allow programmers to do this.. which isn't very helpful.
Steve.
"Cor Ligthert" wrote: Steve,
Ya.... a local file on the clients machine. I can't install anything to the clients machine & the HTML file input control won't work either because we don't want the users to search for the file...which is why it's getting passed in the query string. Microsoft has taken maybe hundreds of millions or more in this to make it impossible to do what you want. You want an easy solution to do this.
Just my thought,
Cor
Think about the consequences of what you are asking.
How do I either read or write to a local file via a browser?
How do I upload a file via browser without the user explicitly doing so?
The security implications are astounding. Hackers would have (and have had)
a field day.
This is precisely why MS spent so much money (and apparently need
to spend more because their stuff still isn't as secure as it needs to be).
--
2004 and 2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.masterado.net
"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:2F******** *************** ***********@mic rosoft.com... So is there no way to set the text for the File field? Even using Java Script? Maybe hiding the file field & setting the text & then loading that... I don't really care where I parse the file at...I could parse it after I upload it...the main objective is to not allow the user to have to go & select a file because the file is being passed by another application & our users aren't very smart...we don't want them to try to find the file.
So how about some alternatives rather than Microsoft spending millions to not allow programmers to do this.. which isn't very helpful.
Steve.
"Cor Ligthert" wrote:
Steve,
> Ya.... a local file on the clients machine. I can't install anything > to > the > clients machine & the HTML file input control won't work either because > we > don't want the users to search for the file...which is why it's getting > passed in the query string. > Microsoft has taken maybe hundreds of millions or more in this to make it impossible to do what you want. You want an easy solution to do this.
Just my thought,
Cor
You still haven't really explained why you need to read/write/upload
a file from their machine without them knowing?
What is in the file that you need a browser to have access to?
--
2004 and 2005 Microsoft MVP C#
Robbe Morris http://www.robbemorris.com http://www.masterado.net
"Steve" <St***@discussi ons.microsoft.c om> wrote in message
news:1A******** *************** ***********@mic rosoft.com... Ya.... a local file on the clients machine. I can't install anything to the clients machine & the HTML file input control won't work either because we don't want the users to search for the file...which is why it's getting passed in the query string.
Any ideas?
"Robbe Morris [C# MVP]" wrote:
Nothing to do with ASP.NET. You'd have to lower each of their security settings in the browser to the lowest level possible. Even then, the browser might not enable you to do this.
Why is it that you need to read/write a local file? Perhaps you can achieve your goal another way.
-- 2004 and 2005 Microsoft MVP C# Robbe Morris http://www.robbemorris.com http://www.masterado.net/home/listings.aspx "Steve" <St***@discussi ons.microsoft.c om> wrote in message news:8C******** *************** ***********@mic rosoft.com... >I do have control over the clients....i mean I can have the clients give > access to aspnet to a specific folder, etc... would this help? > > "Steve" wrote: > >> I have a web app that needs to parse through a file that is located on >> the >> client machine. I get the file string from a query string & then >> parse >> it. >> It is working fine on my development box but when I put it out on the >> test >> server the application is looking for the file on the server & not on >> the >> client machine. >> >> I am essentially taking the query string & using a stream reader to >> read >> the >> file. >> >> I'm sure i'm doing something whacky...so PLEASE set me straight! >> >> Steve. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bugbear |
last post by:
Subject pretty much says it all. I'd like to
parse XML (duh!) using Xerces (because its fast,
and reliable, and comprehensive, and supports lots
of features).
I'd like to conform to standards as much as possible,
so I'd like to call Xerces under the JAXP API.
I'd like to validate the XML against a DTD, so that
errors are flagged up to the user, and I can transcribe
|
by: g.kanaka.raju |
last post by:
Hi,
I wanted to write a function that gets the file path as an argument.
The file
path make take one of the two forms :
(i) Absolute file path e.g., /usr/local/file.log or
(ii)it may be $USRLOCAL/file.${EXT} where USRLOCAL=/usr/local and
$EXT=log
|
by: Brett |
last post by:
I uploaded an ASP.NET website from my developer machine to a remote server.
The paths differ slightly as follows:
Local Path: C:\Inetpub\wwwroot\mysite
Server Path: C:\Inetpub\mysite.com\
I get the following error on the server:
|
by: Steve |
last post by:
I have a web app that needs to parse through a file that is located on the
client machine. I get the file string from a query string & then parse it.
It is working fine on my development box but when I put it out on the test
server the application is looking for the file on the server & not on the
client machine.
I am essentially taking the query string & using a stream reader to read the
file.
I'm sure i'm doing something...
|
by: Eric Anderson |
last post by:
I have some files that sit on a FTP server. These files contain data
stored in a tab-separated format. I need to download these files and
insert/update them in a MySQL database. My current basic strategy is to
do the following:
1) Login to the ftp server using the FTP library in PHP
2) Create a variable that acts like a file handle using Stream_Var in PEAR.
3) Use ftp_fget() to read a remote file into this variable (this is so I
don't...
| |
by: Thomas Kowalski |
last post by:
Hi,
I have to parse a plain, ascii text file (on local HD). Since the file
might be many millions lines long I want to improve the efficiency of
my parsing process. The resulting data structure shall look like this
the following:
class A {
...
int value;
}
|
by: Uncle Leo |
last post by:
I created an OleDbDataAdapter with the wizard in Visual Studio 2003.
It created a dataset, connectionstring etc. for me to work with. It
also created a .xsd file where one of the columns type is set to date.
My program is being used in many different countries, and many
different local settings. Some time ago a user from Turkey contacted
me saying my program crashed on his system with the following error
code:
System.ArgumentException:...
|
by: savj14 |
last post by:
I have been driving myself crazy the past few days trying to figure this out. I have tried different Parsing Scripts and have read and searched various things trying to find a solution. I am officially lost.
What I want to do is list some of My Xbox Live info on my Website. I found a Website where most of my information is stored as an XML File. This website is found here...
|
by: Sidhartha |
last post by:
Hi,
I am facing a problem while parsing local language characters using
sax parser. We use DOM to parse and SAX to read the source. But when
our application parses strings with local language especially
czech,polish,turkish in place of local language character some other
word is comming.
Eg:
Input string :ahoj, jak se máš
Output string :ahoj, jak se máš
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |