Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get bin directory from an ASP.NET web service (GetExecutingAssembly)

Status
Not open for further replies.

nwruiz

Programmer
Jun 22, 2005
60
US
Hello,

I would like to locate the bin directory of the executing assembly of an ASP.NET web service during runtime. Normally, with console and windows applications, I could simply use

Code:
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)

However, when debugging my web service, I noticed that this gives me a temporary directory that does not match my bin directory (since it's a web service) and it also does not include the external files that were imported into the solution (GnuPG's gpg.exe file and its subdirectories, for example). Could someone provide me with a snippet of code to determine the location of the bin directory, in order that I can access the executable file within the bin directory?

Thanks for your time.

Nick Ruiz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top