473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Isolated Storage

I'm executing an external process from my C# app.

It uses a typical command line type interface:

program.exe inputfile outputfile

I want the outputfile stored in IsolatedStorage.

Is there anyway to do this without re-reading
the file and re-writing it?

I really like the idea of IsolatedStorage for these
files, but if that won't work is it OK to just store
them in a directory next to my executable?

I thought I read somewhere that this could cause
a security exception?

Where else should I be storing user files?

Thanks,

Jon

Jul 9 '06 #1
7 6224
Hello Jon,

JBI'm executing an external process from my C# app.
JBIt uses a typical command line type interface:
JBprogram.exe inputfile outputfile
JBI want the outputfile stored in IsolatedStorage.
JBIs there anyway to do this without re-reading
JBthe file and re-writing it?

Do you mean doesn't put files in storage and keep only references?

JBI really like the idea of IsolatedStorage for these files, but if
JBthat won't work is it OK to just store them in a directory next to
JBmy executable?

and where i'd like to keep them otherwise?

JBI thought I read somewhere that this could cause
JBa security exception?
JBWhere else should I be storing user files?

Which files? Settings or what? You can encrypt/secure them

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Jul 9 '06 #2
You could try to first create a file in isolated storage, get it's name,
and then use the name to make the external program overwrite the file.

I don't know if it's possible, and it kind of breaks the "Isolated" in
"IsolatedStorage".

If it can't be done that way, you can create a temporary file using the
name from System.IO.Path.GetTempFileName(). That way you won't have it
in your program directory.

Jon Berry wrote:
I'm executing an external process from my C# app.

It uses a typical command line type interface:

program.exe inputfile outputfile

I want the outputfile stored in IsolatedStorage.

Is there anyway to do this without re-reading
the file and re-writing it?

I really like the idea of IsolatedStorage for these
files, but if that won't work is it OK to just store
them in a directory next to my executable?

I thought I read somewhere that this could cause
a security exception?

Where else should I be storing user files?

Thanks,

Jon
Jul 9 '06 #3
I don't thin you can get a full path to a file in isolated storage.

"Göran Andersson" <gu***@guffa.comwrote in message
news:O6**************@TK2MSFTNGP03.phx.gbl...
You could try to first create a file in isolated storage, get it's name,
and then use the name to make the external program overwrite the file.

I don't know if it's possible, and it kind of breaks the "Isolated" in
"IsolatedStorage".

If it can't be done that way, you can create a temporary file using the
name from System.IO.Path.GetTempFileName(). That way you won't have it in
your program directory.

Jon Berry wrote:
>I'm executing an external process from my C# app.

It uses a typical command line type interface:

program.exe inputfile outputfile

I want the outputfile stored in IsolatedStorage.

Is there anyway to do this without re-reading
the file and re-writing it?

I really like the idea of IsolatedStorage for these
files, but if that won't work is it OK to just store
them in a directory next to my executable?

I thought I read somewhere that this could cause
a security exception?

Where else should I be storing user files?

Thanks,

Jon

Jul 9 '06 #4
It may very well be as you think.

The IsolatedStorageFileStream inherits the Name property from the
FileStream class. I don't know if this is the physical path of the file
or just a local name inside the isolated storage.

Steve wrote:
I don't thin you can get a full path to a file in isolated storage.

"Göran Andersson" <gu***@guffa.comwrote in message
news:O6**************@TK2MSFTNGP03.phx.gbl...
>You could try to first create a file in isolated storage, get it's name,
and then use the name to make the external program overwrite the file.

I don't know if it's possible, and it kind of breaks the "Isolated" in
"IsolatedStorage".

If it can't be done that way, you can create a temporary file using the
name from System.IO.Path.GetTempFileName(). That way you won't have it in
your program directory.

Jon Berry wrote:
>>I'm executing an external process from my C# app.

It uses a typical command line type interface:

program.exe inputfile outputfile

I want the outputfile stored in IsolatedStorage.

Is there anyway to do this without re-reading
the file and re-writing it?

I really like the idea of IsolatedStorage for these
files, but if that won't work is it OK to just store
them in a directory next to my executable?

I thought I read somewhere that this could cause
a security exception?

Where else should I be storing user files?

Thanks,

Jon
Jul 9 '06 #5

"Michael Nemtsev" <ne*****@msn.comwrote in message
news:17***************************@msnews.microsof t.com...
JBI want the outputfile stored in IsolatedStorage.
JBIs there anyway to do this without re-reading
JBthe file and re-writing it?

Do you mean doesn't put files in storage and keep only references?
I wanted to put the files in IsolatedStorage.
I was just trying to avoid the extra write to the hard drive.
Thus avoiding the need to delete the temporary files generated by the
external process after they are put in IsolatedStorage.
>
JBI really like the idea of IsolatedStorage for these files, but if
JBthat won't work is it OK to just store them in a directory next to
JBmy executable?

and where i'd like to keep them otherwise?
I just found Application.LocalUserAppDataPath
I guess that's the next best solution.
JBI thought I read somewhere that this could cause
JBa security exception?
JBWhere else should I be storing user files?

Which files? Settings or what? You can encrypt/secure them
No, they are tweaked out media files. They are not really meant to be used
by other programs.
The user should not really need to access the files directly.

The point I was trying to make was that I read somewhere that
non-administrator user
may not be able to write to the "Program Files" directory. True?

Jon

Jul 9 '06 #6

"Göran Andersson" <gu***@guffa.comwrote in message
news:O6**************@TK2MSFTNGP03.phx.gbl...
If it can't be done that way, you can create a temporary file using the
name from System.IO.Path.GetTempFileName(). That way you won't have it in
your program directory.
Thanks, I might just end up using this temp file dealio.

If I do, will I need to programmatically delete the files or is this done
for me?

Jon

Jul 9 '06 #7

"Jon Berry" <no***@jose.blahwrote in message
news:uM**************@TK2MSFTNGP03.phx.gbl...
>
"Göran Andersson" <gu***@guffa.comwrote in message
news:O6**************@TK2MSFTNGP03.phx.gbl...
>If it can't be done that way, you can create a temporary file using the
name from System.IO.Path.GetTempFileName(). That way you won't have it in
your program directory.

Thanks, I might just end up using this temp file dealio.

If I do, will I need to programmatically delete the files or is this done
for me?
No you need to handle this yourself too.
Jul 9 '06 #8

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

Similar topics

1
by: Jody Gelowitz | last post by:
Exactly what is the size limit of Isolated Storage in the Internet permission set? I have a document indicating it is 10MB (http://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClients/) ...
3
by: gani | last post by:
hi, how to get the fullpath of created IsolatedStorage directory. thanks. -- gani
1
by: malcolm | last post by:
Hello, We use several user controls and derived custom controls. Some of which actually hit the database at design time to show data (such as filling a list box, etc...) Our c# client server...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Group, After a long week end I am back again. Its nice and refreshing after a short vacation so lets get started with .NET once again. Today we will discuss about Isolated Storage. This is...
3
by: U.C. | last post by:
Hello, My client needs to collect data on a disconnected computer. I am hoping I could store data in Isolated Storage as XML files and expose later to a server (does anyone have experience with...
1
by: C#Coder | last post by:
I need to create an Isolated Storage File for my assembly with machine level scope. I have used the 'GetMachineStoreForAssembly' method to do this and this creates the Isolated Storage File...
0
by: CodeMonkey | last post by:
I am using Isolated Storage to save some machine wide application settings. I noticed that if I saved the settings in a non-dotfuscated exe, those settings were not found in a dotfuscated exe. I...
0
by: Daniel | last post by:
I have to interact with a database which is in isolated storage. OleDbConnection requires a data source but I cannot see a method to get the path to my file in isolated storage. What can I do?...
2
by: Andrus | last post by:
WinForms MDI application stores user preferences (form position, sizes, query params etc) in isolated storage. I want to offer user menu selection "Restore defaults" which deletes all those...
0
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...
0
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,...
0
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...
1
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.