Get assembly path in asp.net

  • Thread starter Sebastiao Pereira Filho
  • Start date
S

Sebastiao Pereira Filho

I have an external assembly that's access by an asp.net page. I want this assembly to load a xml configuration file, and I want to put this file in the same directory wich the assembly is located.

I tried to use System.Reflection.Assembly.GetExecutingAssembly().Location to get the assembly directory, but it returned the temporary path asp.net uses to run the assembly. Something like "c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files\maindotnet\7b206850\749bb87\assembly\dl2\dcf60b7c\72634910_1f97c301\".

Is there a way to retrieve the assembly original path?

Thanks!
 
K

Kevin Spencer

AppDomain.CurrentDomain.BaseDirectory

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

message I have an external assembly that's access by an asp.net page. I want this
assembly to load a xml configuration file, and I want to put this file in
the same directory wich the assembly is located.

I tried to use System.Reflection.Assembly.GetExecutingAssembly().Location to
get the assembly directory, but it returned the temporary path asp.net uses
to run the assembly. Something like
"c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\maindotnet\7b206850\749bb87\assembly\dl2\dcf60b7c\72634910_1f97c301\".

Is there a way to retrieve the assembly original path?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top