Entlib External Config Files and ASP.Net

Topics: General discussion
Dec 3, 2007 at 3:41 PM

I've have a problem locating config files when using some .dll's inside an ASP application. The problem is i'm sure this was working!! To explain properly i have some standard .dll's that use configuration files which are not the web or app .config files, this were built using information obtaining from Tom Hollanders's External configuration files in Enterprise Library for .NET Framework 2.0 I use the following call to find where the configuration files are :

String strPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location);

I'm sure this used to return c:\inetpub\wwwroot\<application name>\bin which was fine since the .dll's and the config files are present here.

I'm now getting C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<application name>\89552208\7f68e6ff\assembly\dl3\e13255d6.

I've tried using

String strPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

Which is returns the same temp path.

Is there any suggestions how i could resolve this problem ? Ideally i'd like to work how it was working with the .config files in bin directory along with the .dll they configured.

Any help would be appreicated.