开发者

Where is it looking for the COM/WCF config file?

I have an arrangement where I am replacing legacy code with a shiny new WCF based service.

I have a dll (a.dll) that calls a dll that I am replacing (b.dll)

b.dll uses a WCF call to access functionality provided by my IIS hosted WCF app (c) I am using a hand written proxy for b~c so that everything is adequately tidied up.

The problem I have is when I run my test app that uses a.dll and therefore b.dll and c it complains it can not find my endpoint config.

Where is it 开发者_如何学Clooking for the config file in this situation? I have tried creating a b.dll.config.

I am loathed to hard code as that is one of the key benefits of WCF it can be configured via config and hence no recompile.


There is only ever a single default config file, period. If you are running app.exe, then that is app.exe.config. If it's a web-based application, then it's the hierarchy of web.config files.

That's where it's looking for the configuration.


ANSWER FOLLOWS: --APPARENTLY I AM NOT ALLOWED TO ANSWER MY OWN QUESTION FOR 8hrs--

Hello right,

To all those that follow. I identified the config file in the end by following something that someone else suggested.

Procmon. I added a filter include->path->.config

and from this I found that as I was running a.dll 'in code' using the VB6 ide that it was looking in

C:\Program Files\Microsoft Visual Studio\VB98\VB6.exe.config

Crazy, I know as this dll was being called my own test.exe and test.exe.config did not work.

Also, it only looks for the file when VB6.exe is instantiated so changes to it (obviously I guess) require a recycle...

i tried code that apparently output the config location and 'threw an exception' with this information. These paths were all wrong.

Now I just need to figure out where it looks when a.dll is not being run in code.... deep joys!

UPDATE: For completion when the a.dll is not being run in code the config file is test.exe.config.

This is confirmed.

Thanks guys!


To add to the other solutions: while it is looking in weird places when you run it in code, I found that I could simply make myapp.exe, rename the config to myapp.exe.config, then run the exe (ie not in the ide) and it would find it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜