大佬教程收集整理的这篇文章主要介绍了添加WCF服务引用时,不会将配置详细信息添加到web.config,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings /> <client /> </system.serviceModel>@H_874_2@为什么会这样?它也适用于控制台应用程序或我尝试的任何其他项目类型.有帮助吗? @H_874_2@这是我的WCF服务的app.config:
<?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" /> </system.web> <!-- When deploying the service library project,the content of the config file must be added to the host's app.config file. System.Configuration does not support config files for libraries. --> <system.serviceModel> <services> <service name="CoolSQl.Server.WCF.Coolservice"> <endpoint address="" binding="webhttpBinding" contract="CoolSQl.Server.WCF.Coolservice" behaviorConfiguration="SilverlightFaultBehavior"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexhttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://localhost:8732/Design_Time_Addresses/CoolSQl.Server.WCF/Coolservice/" /> </baseAddresses> </host> </service> </services> <behaviors> <endpointBehaviors> <behavior name="webBehavior"> <webhttp /> </behavior> <behavior name="SilverlightFaultBehavior"> <silverlightFaults /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <webhttpBinding> <binding name="DefaultBinding" bypassProxyOnLocal="true" useDefaultWebProxy="false" hostNameComparisonMode="WeakWildcard" sendTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:00:10" maxReceivedmessageSize="2147483647" transferMode="Streamed"> <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" /> </binding> </webhttpBinding> </bindings> <extensions> <behaviorExtensions> <add name="silverlightFaults" type="CoolSQl.Server.WCF.SilverlightFaultBehavior,CoolSQl.Server.WCF" /> </behaviorExtensions> </extensions> <diagnostics> <messageLogging logEntiremessage="true" logMalformedmessages="false" logmessagesAtserviceLevel="true" logmessagesAtTransportLevel="false" maxmessagesToLog="3000" maxSizeOfmessageToLog="2000" /> </diagnostics> </system.serviceModel> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> </startup> <system.diagnostics> <sources> <source name="System.serviceModel.messageLogging" switchValue="Information,ActivityTracing"> <listeners> <add name="messages" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\messages.e2e" /> </listeners> </source> </sources> </system.diagnostics> </configuration>
以上是大佬教程为你收集整理的添加WCF服务引用时,不会将配置详细信息添加到web.config全部内容,希望文章能够帮你解决添加WCF服务引用时,不会将配置详细信息添加到web.config所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。