我在具有 net.tcp 绑定的 iis 7.0 上托管工作流服务。我的配置文件就像
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<appSettings>
<add key="SMTPAddress" value="000.00.0.00"/>
<add key="ToAddress" value="abc@abc.com"/>
<add key="FromAddress" value="abc@abc.com"/>
<add key="SMTPUserName" value="abc@abc.com"/>
<add key="SMTPPassword" value ="abc@abc.com"/>
</appSettings>
<connectionStrings>
<add name="RewindConnectionString" connectionString="Data Source=xxx;User Id=xxx;Password=xxx;Connection Timeout=5" providerName="Oracle.DataAccess.Client" />
</connectionStrings>
<system.serviceModel>
<tracking>
<profiles>
<trackingProfile name="Sample Tracking Profile">
<workflow activityDefinitionId="*">
<workflowInstanceQueries>
<workflowInstanceQuery>
<states>
<state name="*"/>
</states>
</workflowInstanceQuery>
</workflowInstanceQueries>
<activityStateQueries>
<activityStateQuery activityName="*">
<states>
<state name="*"/>
</states>
<variables>
<variable name="*"/>
</variables>
</activityStateQuery>
</activityStateQueries>
<activityScheduledQueries>
<activityScheduledQuery activityName="*" childActivityName="*"/>
</activityScheduledQueries>
<faultPropagationQueries>
<faultPropagationQuery faultSourceActivityName="*" faultHandlerActivityName="*"/>
</faultPropagationQueries>
<customTrackingQueries>
<customTrackingQuery name="*" activityName="*"/>
</customTrackingQueries>
</workflow>
</trackingProfile>
</profiles>
</tracking>
<services>
<service name="RewindTest" behaviorConfiguration="RewindTest_Behavior">
<endpoint address="RewindTest"
binding="netTcpBinding" contract="IRewindTestService" name="RewindTestNetTcpEndPoint" bindingConfiguration="RewindTestBinding" />
<endpoint address="wce"
binding="netTcpBinding" kind="workflowControlEndpoint" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:9095/Service.Workflow.RewindTest/RewindTest" />
</baseAddresses>
</host>
<endpoint address="mex"
binding="mexTcpBinding"
name="MEX"
contract="IMetadataExchange" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding portSharingEnabled="true" name="RewindTestBinding" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<standardEndpoints>
<workflowControlEndpoint>
<standardEndpoint/>
</workflowControlEndpoint>
</standardEndpoints>
<extensions>
<behaviorExtensions>
<add name="oracleInstanceStore" type="Devart.Data.Oracle.Activities.Configuration.OracleInstanceStoreElement, Devart.Data.Oracle.WorkflowFoundation" />
<add name="oracleTracking" type="Devart.Data.Oracle.Activities.Configuration.OracleTrackingElement, Devart.Data.Oracle.WorkflowFoundation" />
</behaviorExtensions>
</extensions>
<behaviors>
<serviceBehaviors>
<behavior name="RewindTest_Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
<oracleTracking
connectionString="User Id=xxx;Password=xxx;Server=xxx;"
profileName="Sample Tracking Profile" />
<oracleInstanceStore
connectionString="User Id=xxx;Password=xxx;Server=xxx;"
instanceEncodingOption="None"
instanceCompletionAction="DeleteNothing"
instanceLockedExceptionAction="NoRetry"
hostLockRenewalPeriod="00:00:30"
runnableInstancesDetectionPeriod="00:00:05" />
<workflowIdle timeToUnload="0"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
现在我的问题是我无法通过 net.tcp 绑定生成代理,但我可以通过 http 生成它。http://testsrv.com/RewindService/RewindTest.xamlx?wsdl。然后我无法调用接收操作方法。虽然它与本地控制台主机工作正常。