473,385 Members | 2,015 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,385 software developers and data experts.

From which ASP.NET application directory was a DLL called from?

I need to determine which ASP.NET web site directory a DLL was called from.
The directory path is needed so that a config file located there can be
called by a datalayer component in the same directory, that will be called by
the web site.

(A DLL called from an ASP.NET website is started not in that installation
directory but in C:\Windows\System for Windows 2000 and XP. For Windows 2003
Server, the location is C:\Windows\System\InetSrv and for running within
Visual Studio 2005, from within one of its directories.)

Nov 19 '05 #1
2 1405
You can always call AppDomain.CurrentDomain.BaseDirectory

-Brock
DevelopMentor
http://staff.develop.com/ballen
I need to determine which ASP.NET web site directory a DLL was called
from. The directory path is needed so that a config file located there
can be called by a datalayer component in the same directory, that
will be called by the web site.

(A DLL called from an ASP.NET website is started not in that
installation directory but in C:\Windows\System for Windows 2000 and
XP. For Windows 2003 Server, the location is C:\Windows\System\InetSrv
and for running within Visual Studio 2005, from within one of its
directories.)

Nov 19 '05 #2
This answera a problem that has troubled me for some time. Whilst the
results are not quite consistant (for example Win Forms, Dos Apps and Windows
Service give the actual location of the bin directory where as Web Form and
Web Service give the web site sirectory not the location of the bin file),
the location is an actual one not a location within cache.

Thank you!

"Brock Allen" of DevelopMentor wrote:
You can always call AppDomain.CurrentDomain.BaseDirectory
http://staff.develop.com/ballen


Nov 19 '05 #3

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

Similar topics

4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
8
by: JohnnySparkles | last post by:
Hi All, I'm working on an application which uses a dll for some of its classes. I build the application and the dll and it runs fine on any machine with Visual Studio .NET installed on it....
6
by: alanknipmeyer | last post by:
Hi, I`m in the process of migrating a Access 2002 (Run in 2000 mode) from Windows 98 to Win2K Server. It is a shared resource via a file share on the 98 Server. Client systems are Win98 with the...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
9
by: Mads W. | last post by:
I want to read an ini file which is located in the same dir as my .exe file. But how can I do that without having to have the excact same dir for all my program installations. Let me try to...
0
by: Gianluigi | last post by:
Ok, I don't understand this kind of problem... I have for example a machine called "pippo". I put an ASP.NET application called "WORK" in pippo\d\application. Then I create a new web site...
19
by: Steve Franks | last post by:
I am using VS.NET 2005 beta 2. When I run my project locally using the default ASP.NET Development Web Server it runs using a root address like this: http://localhost:11243/testsite/ However...
15
by: Joseph Geretz | last post by:
OK, I'll admit it up front - I just don't get it. Here's our previous VS2003 development model. Developers develop the WS solution on their own workstations, using their own IIS web servers...
18
by: Arthur | last post by:
Hi All, I would like to get the name of the user given their networkID, is this something Active Directory would be useful for?(For intranet users) If so, can you please point me to some sample...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.