WCF服务库中有多少app.config必须在控制台主机的app.config中重复?
Basically: everything.
The app.config
for the WCF service class library will not be read by .NET.
You need to have all the settings (more specifically: everything in <system.serviceModel>
section) into your host application's app.config
file.
@Broyian: WCF configuration is a notoriously difficult and often not very well understood topic. I have two video show episodes that I really like that helped me understand configuration a lot better - check them out!
@Broiyan: you might want to check out this blog post here about improvement in WCF 4.0 making it less of a "beast":
I may not understand the question, but if you are trying to get rid of the app.config in a WCF client application (ie to put everything inside of a DLL), see here
C# WCF: Having a single app.config in a shared library that provides access to the Service
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.