Change the default WCF directory
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 defau开发者_开发百科lt 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!
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.
Maybe you can try to access it from System.AppDomain.CurrentDomain.BaseDirectory
.
精彩评论