app.config 示例
1 <?xml version="1.0" encoding="utf-8" ?> 2 <configuration> 3 <system.webServer> 4 <modules runAllManagedModulesForAllRequests="true"> 5 <add name="DomainServiceModule" preCondition="managedHandler" 6 type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 7 </modules> 8 <validation validateIntegratedModeConfiguration="false" /> 9 </system.webServer> 10 <system.serviceModel> 11 <serviceHostingEnvironment aspNetCompatibilityEnabled="true" 12 multipleSiteBindingsEnabled="true" /> 13 <behaviors> 14 <serviceBehaviors> 15 <behavior name=""> 16 <serviceMetadata httpGetEnabled="true" /> 17 <serviceDebug includeExceptionDetailInFaults="false" /> 18 </behavior> 19 </serviceBehaviors> 20 </behaviors> 21 <services> 22 <service name="SerivceCompany.Service1"> 23 <endpoint address="" binding="wsHttpBinding" contract="SerivceCompany.IService1"> 24 <identity> 25 <dns value="localhost" /> 26 </identity> 27 </endpoint> 28 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 29 <host> 30 <baseAddresses> 31 <add baseAddress="http://localhost:8732/Design_Time_Addresses/SerivceCompany/Service1/" /> 32 </baseAddresses> 33 </host> 34 </service> 35 </services> 36 </system.serviceModel> 37 <system.web> 38 <httpModules> 39 <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 40 </httpModules> 41 </system.web> 42 </configuration>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。