473,778 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parsing a local file

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.
Jul 21 '05
20 2010
You could also write your own desktop app that wraps around
the Web Browser control. You can use windows code to react to
events that occured in the browser.

--
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:07******** *************** ***********@mic rosoft.com...
Thanks for the info robbe... ya..i am ending up having to write a local
app
that will just send the file to a webservice & the local app will spawn
the
web page.

Thanks for the thoughts.

Steve.

"Robbe Morris [C# MVP]" wrote:
The browser is always going to be a problem for you.

You should probably consider writing a .NET windows service to install
on their PCs. It would use a SystemFileWatch er to sit and wait
on new files being created by this other application. Upon
receiving the event, your windows service could upload
the file to your web site and pass the machine name or
even the windows id associated with the file.

You'll need to give some thought as to the way you
want to associate your web site user accounts with the
upload files from your service. 99.9% of the time, the
local file should be uploaded to your web server prior
to the user ever logging onto the web site.

--
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:45******** *************** ***********@mic rosoft.com...
> Thank you Arnaud for at least trying to offer a suggestion. That's all
> I
> was
> after... I know there are no Microsoft Police... i was just making a
> point
> that people out here are after suggestions to there problems. FSC only
> offers the ability to pass a string with a path & file name...no
> ability
> to
> copy or move the file.
>
> I was only asking for suggestions to my problem... in my first message,
> I
> stated that I was probably doing something whacky....so please set me
> straight. I have no idea how that turned into, "Stealing bankaccounts
> is
> something that a lot of people want to do. By the way, people asking
> this
> kind of questions are placing themselves in a kind of suspected area
> whatever
> they say that the reason is."
>
> From Cor Lighthert.
>
> fyi,
>
> http://4umi.com/web/javascript/filteread.htm for those of you dealing
> with
> this issue in a corprate intranet. I have also seen some sendkeys
> solutions..both are a bit cheesy but if they work around the problem
> then
> it
> suits the business needs.
>
> Steve.
>
>
>
> "ad******@c lub-internet.fr" wrote:
>
>>
>> Steve a écrit :
>> > ok...so just to rest your paranoid mind
>>
>> <snip>
>>
>> 1) There is no such thing as "Microsoft Message Board Police" around
>> here, except for the most patent spams. Be assured that your message
>> won't be erased, stamped or placed under NSA surveillance ;-)
>>
>> 2) Nobody is accusing you from stealing bank accounts. People are
>> explaining you that the possiblity you ask is a dangerous security
>> hole
>> that could afford to do such a thing, and that is why it is best left
>> forbidden.
>>
>> 3) Try to think from a security point of view : I do not know you,
>> neither anyone in this newsgroup. Therefore, as far as I am concerned,
>> your explanation concerning your work could be a fairy tale and you
>> could be just another wanabee-hacker (I am not accusing you of
>> anything
>> here : I am just trying to explain you the "security-first" mind you
>> should have when dealing with Internet apps). It's not a matter of
>> being paranoid : it's a matter of professionnal responsability when
>> exposing company critical information to the outside world (which
>> happens pretty much as soon as you put it on an HTTP network).
>>
>> This said, there are probably many workarounds to your problem : For
>> example, can FSC be configured to copy the temp file to a network
>> share, where it would be accessible to the server?
>>
>> Arnaud
>> MVP - VC
>>
>>


Jul 21 '05 #21

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

Similar topics

0
4272
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
9
2872
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
2
1481
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:
20
295
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...
8
2943
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...
1
2299
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; }
0
1139
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:...
0
1200
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...
1
3502
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&aacute;š
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
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,...
0
10292
Oralloy
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...
0
10122
jinu1996
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...
1
10061
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,...
0
9923
tracyyun
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...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
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();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.