作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 WCF 服务配置文件中定义了两个基地址:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
propagateActivity="true">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelTraceListener">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="C:\WCF Service Logs\app_tracelog.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelTraceListener" traceOutputOptions="DateTime, Timestamp">
<filter type="" />
</add>
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcp" maxBufferPoolSize="50000000" maxReceivedMessageSize="50000000">
<readerQuotas maxDepth="500" maxStringContentLength="50000000" maxArrayLength="50000000" maxBytesPerRead="50000000" maxNameTableCharCount="50000000" />
<security mode="None"></security>
</binding>
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="ReportingComponentLibrary.TemplateServiceBehavior"
name="ReportingComponentLibrary.TemplateReportService">
<endpoint address="TemplateService" binding="netTcpBinding" bindingConfiguration="netTcp"
contract="ReportingComponentLibrary.ITemplateService"></endpoint>
<endpoint address="ReportService" binding="netTcpBinding" bindingConfiguration="netTcp"
contract="ReportingComponentLibrary.IReportService"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8001/TemplateReportService" />
<add baseAddress="http://localhost:8181/TemplateReportService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ReportingComponentLibrary.TemplateServiceBehavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
http://localhost:8181/TemplateReportService
net.tcp://localhost:8001/TemplateReportService
最佳答案
您将 Net.TCP 基地址定义为:
net.tcp://localhost:8001/TemplateReportService
<endpoint address="TemplateService"
<endpoint address="ReportService"
<endpoint>
元素上定义的相对地址” - 这给出:
net.tcp://localhost:8001/TemplateReportService/TemplateService
net.tcp://localhost:8001/TemplateReportService/ReportService
关于.net - WCF 服务基地址 Http 和 netTcp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2012765/
目前我有几个配置了以下目录的catalina bases, conf logs server webapps work bin、lib 和common 目录都还在$CATALINA_HOME 中。 我
我是一名优秀的程序员,十分优秀!