开发者

Change the default WCF directory

开发者 https://www.devze.com 2022-12-24 02:22 出处:网络
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 \"Inetp

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号