Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Is this one platform independent?

Posted on 2006-07-18
6
324 Views
Last Modified: 2010-05-18
Hello is this one platform independent?
Environment.GetEnvironmentVariable("TMP");
0
Comment
Question by:m-jansen
  • 3
  • 2
6 Comments
 

Author Comment

by:m-jansen
ID: 17128555
I mean does it work on linux?
0
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 75 total points
ID: 17128578
Not necessarily - it depends on what build you are using.  It is unlikley unless it has been manually set
0
 

Author Comment

by:m-jansen
ID: 17128610
Ok. So it mostly works with Windows? (I'm using Environment.GetEnvironmentVariable("TMP"); in an aspx page) I try to find a universal method to find the temporaty folder for the user that surf on that page.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 35

Accepted Solution

by:
Raynard7 earned 75 total points
ID: 17128664
If the environment variable $TMP is set, its value should be used as the directory for temporary files. Otherwise the environment variable $HOME probably will be populated. If neither $TMP nor $HOME is set, use the current working directory
0
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 50 total points
ID: 17128699
Mono supports Environment.GetEnvironmentVariable, you can see this in Mono reference:
http://www.go-mono.com/docs/

I don't know whether Linux has environment variables. If yes, this should work.
0
 

Author Comment

by:m-jansen
ID: 17128837
Ok. Thanks for the info. I now think it's not a good idea to use this method. Rather try to make something that works on the server instead of on the client.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question