2012-05-17 77 views
1

我在iis 7.0上用net.tcp綁定託管工作流服務。我的配置文件像如何在IIS 7.0上使用net.tcp綁定承載工作流服務(.xamlx)?

<?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="[email protected]"/> 
    <add key="FromAddress" value="[email protected]"/> 
    <add key="SMTPUserName" value="[email protected]"/> 
    <add key="SMTPPassword" value ="[email protected]"/> 
    </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。那麼我無法調用接收操作方法。雖然它與本地控制檯主機正常工作。

回答