Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is this one platform independent?

Posted on 2006-07-18
6
Medium Priority
?
345 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 300 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Accepted Solution

by:
Raynard7 earned 300 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 200 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

916 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