tags:

views:

18

answers:

2

I have a WCF service which references a 3rd party DLL. That DLL looks for a settings file in the same directory as the DLL. However, WCF by default sets the current directory to "Inetpub" so of course the setting file can't be found.

I tried to set WCF to "Aspnet compatibility mode" but that didn't seem to work.

Any help is much appreciated!

+1  A: 

Can you pass in the location of the settings files to the DLL? That's when the Aspnet compatibility mode comes to use, see this answer.

But this might be what you're looking for.

Bryan Denny
Unfortunately I can't pass in the path. It always looks in the same directory as the DLL.
BrokeMyLegBiking
A: 

Maybe you can try to access it from System.AppDomain.CurrentDomain.BaseDirectory.

erxuan