473,411 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Getting current directory

Hello everybody.
I'm developing a class library project. I want a method to return the
path where the compiled .dll file will be placed.
I try with the Environment.CurrentDirectory property, testing the class

within an ASP.NET application, but it returns the path of the
aspnet_wp.exe process (C:\WINDOWS\system32).
Any clue? Thanks

Nov 19 '05 #1
3 1746
hi,
try using System.Reflection.Assembly.GetExecutingAssembly(). GetName().codeBase
--
HTH
srini
http://www.expertszone.com
"al************@gmail.com" wrote:
Hello everybody.
I'm developing a class library project. I want a method to return the
path where the compiled .dll file will be placed.
I try with the Environment.CurrentDirectory property, testing the class

within an ASP.NET application, but it returns the path of the
aspnet_wp.exe process (C:\WINDOWS\system32).
Any clue? Thanks

Nov 19 '05 #2
try using
AppDomain.CurrentDomain.BaseDirectory ( returns current directory )

Regards
Parag

<al************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hello everybody.
I'm developing a class library project. I want a method to return the
path where the compiled .dll file will be placed.
I try with the Environment.CurrentDirectory property, testing the class

within an ASP.NET application, but it returns the path of the
aspnet_wp.exe process (C:\WINDOWS\system32).
Any clue? Thanks

Nov 19 '05 #3
I thanks a lot both of you. Anyway, according to my app, AppDomain
works better ;-)
See you.

Nov 19 '05 #4

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

Similar topics

3
by: Kali K E | last post by:
Hi, I could not understand how I can do the following things in Python. Please help me. 1. First I have to find the current directory from where the script is invoked. 2. Next I have to form a...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
2
by: Kakkanattu | last post by:
Hi, In desktop application, we use different ways to get the current execution directory. I. AppDomain.CurrentDomain.BaseDirectory II. Environment.CurrentDirectory...
15
denny1824
by: denny1824 | last post by:
I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am...
0
by: jagsusa | last post by:
Hi In the following code I could trace out the current logged in user but still the control is blank for me any idea ?? userPicker = new PeopleEditor(); SPUser user = ipsWeb.CurrentUser;...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
0
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...

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.