Windows Server AppFabric 配置的多个实例

发布于 2024-11-06 03:53:13 字数 7066 浏览 4 评论 0原文

我在同一虚拟机上的两个不同虚拟目录上设置了开发和生产环境,并遵循 配置多个 WMS 实例,尝试正确设置它们。它们似乎工作正常,因为我可以看到工作流实例根据连接到它们的客户端而保留在适当的环境中。问题出现在尝试查看 IIS 管理器中的持久实例时。我收到以下错误:

尝试查看持久实例时显示 IIS 错误< /a>

单击“遇到错误”链接时出现错误消息

(*抱歉,我不知道如何直接将图片上传到这篇文章中*)

我拥有的相关配置文件如下:

Default Web.Config

<microsoft.applicationServer>
    <monitoring lockElements="bulkCopyProviders, collectors">
        <bulkCopyProviders>
            <bulkCopyProvider providerName="System.Data.SqlClient" type="Microsoft.ApplicationServer.Monitoring.EventCollector.SqlServerBulkCopy, Microsoft.ApplicationServer.Monitoring, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </bulkCopyProviders>
        <collectors>
            <collector name="" session="0">
                <settings retryCount="5" eventBufferSize="10000" retryWait="00:00:15" samplingInterval="00:00:05" aggregationEnabled="true" />
            </collector>
        </collectors>
        <default enabled="true" connectionStringName="ProductionApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
    </monitoring>
    <persistence>
        <instanceStoreProviders lockItem="true">
            <add name="SqlPersistenceStoreProvider" storeProvider="Microsoft.ApplicationServer.StoreProvider.Sql.SqlWorkflowInstanceStoreProvider, Microsoft.ApplicationServer.StoreProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeControlProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Control.SqlInstanceControlProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeQueryProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Query.SqlInstanceQueryProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </instanceStoreProviders>
        <workflowManagement>
             <workflowManagementServiceInstances lockItem="true">
                 <workflowManagementServiceInstance name="">
                     <instanceStores>
                         <instanceStore name="productionSqlPersistenceStore" location="Workflows.Prod" />
                     </instanceStores>
                 </workflowManagementServiceInstance>
                 <workflowManagementServiceInstance name="Dev">
                     <instanceStores>
                         <instanceStore name="devSqlPersistenceStore" location="Workflows.Dev" />
                     </instanceStores>
                 </workflowManagementServiceInstance>
             </workflowManagementServiceInstances>
         </workflowManagement>
         <instanceStores>
             <add name="devSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" />
             <add name="productionSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
         </instanceStores>
     </persistence>
     <hosting>
         <serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="true" authorizedWindowsGroup="AS_Administrators" />
     </hosting>
 </microsoft.applicationServer>
 <connectionStrings>
     <add connectionString="BigSecret" name="ApplicationServerMonitoringConnectionString" />
     <add connectionString="BigSecret" name="ApplicationServerWorkflowInstanceStoreConnectionString" />
     <add connectionString="BigSecret" name="ProductionApplicationServerMonitoringConnectionString" />
     <add connectionString="BigSecret" name="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
</connectionStrings>

Production Web .Config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.serviceModel>
        <protocolMapping>
            <remove scheme="net.pipe" />
        </protocolMapping>
        <behaviors>
            <serviceBehaviors>
                <behavior>
                    <serviceMetadata httpGetEnabled="false" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                    <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="NoRetry" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
                    <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
                    <workflowUnhandledException action="AbandonAndSuspend" />
                    <workflowIdle timeToPersist="00:00:00" timeToUnload="00:01:00" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
    </system.webServer>
    <microsoft.applicationServer>
        <monitoring lockElements="bulkCopyProviders, collectors">
            <default enabled="true" connectionStringName="workflowStoreConnectionString" monitoringLevel="HealthMonitoring" />
        </monitoring>
        <persistence>
            <instanceStores>
                <remove name="defaultSqlPersistenceStore" />
                <add name="defaultSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="workflowStoreConnectionString" />
            </instanceStores>
        </persistence>
        <hosting>
            <serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="false" />
        </hosting>
    </microsoft.applicationServer>
    <connectionStrings>
        <add connectionString="BigSecret" name="workflowStoreConnectionString" />
    </connectionStrings>
</configuration>

Dev Web.Config - 与生产相同,但使用不同的连接字符串

对于解决错误消息并能够查看持久实例的任何帮助,我们表示赞赏。 TIA。建华

I have both a dev and prod environment set up on two different virtual directories on the same virtual machine and following Configuring Multiple WMS Instances to try and get them both set up properly. They appear to be working fine as I can see workflow instances being persisted in for the appropriate environments based on the client that is connecting to them. The problem comes in trying to view the persisted instances within IIS Manager. I get the following errors:

IIS Error Displayed when trying to look at persisted instances

Error message presented when clicking on "Error(s) encountered" link

(* I appologize, I don't know how to upload images directly into this post *)

The relevant configuration files I have are as follows:

Default Web.Config

<microsoft.applicationServer>
    <monitoring lockElements="bulkCopyProviders, collectors">
        <bulkCopyProviders>
            <bulkCopyProvider providerName="System.Data.SqlClient" type="Microsoft.ApplicationServer.Monitoring.EventCollector.SqlServerBulkCopy, Microsoft.ApplicationServer.Monitoring, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </bulkCopyProviders>
        <collectors>
            <collector name="" session="0">
                <settings retryCount="5" eventBufferSize="10000" retryWait="00:00:15" samplingInterval="00:00:05" aggregationEnabled="true" />
            </collector>
        </collectors>
        <default enabled="true" connectionStringName="ProductionApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
    </monitoring>
    <persistence>
        <instanceStoreProviders lockItem="true">
            <add name="SqlPersistenceStoreProvider" storeProvider="Microsoft.ApplicationServer.StoreProvider.Sql.SqlWorkflowInstanceStoreProvider, Microsoft.ApplicationServer.StoreProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeControlProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Control.SqlInstanceControlProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" storeQueryProvider="Microsoft.ApplicationServer.StoreManagement.Sql.Query.SqlInstanceQueryProvider, Microsoft.ApplicationServer.StoreManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </instanceStoreProviders>
        <workflowManagement>
             <workflowManagementServiceInstances lockItem="true">
                 <workflowManagementServiceInstance name="">
                     <instanceStores>
                         <instanceStore name="productionSqlPersistenceStore" location="Workflows.Prod" />
                     </instanceStores>
                 </workflowManagementServiceInstance>
                 <workflowManagementServiceInstance name="Dev">
                     <instanceStores>
                         <instanceStore name="devSqlPersistenceStore" location="Workflows.Dev" />
                     </instanceStores>
                 </workflowManagementServiceInstance>
             </workflowManagementServiceInstances>
         </workflowManagement>
         <instanceStores>
             <add name="devSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" />
             <add name="productionSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
         </instanceStores>
     </persistence>
     <hosting>
         <serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="true" authorizedWindowsGroup="AS_Administrators" />
     </hosting>
 </microsoft.applicationServer>
 <connectionStrings>
     <add connectionString="BigSecret" name="ApplicationServerMonitoringConnectionString" />
     <add connectionString="BigSecret" name="ApplicationServerWorkflowInstanceStoreConnectionString" />
     <add connectionString="BigSecret" name="ProductionApplicationServerMonitoringConnectionString" />
     <add connectionString="BigSecret" name="ProductionApplicationServerWorkflowInstanceStoreConnectionString" />
</connectionStrings>

Production Web.Config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.serviceModel>
        <protocolMapping>
            <remove scheme="net.pipe" />
        </protocolMapping>
        <behaviors>
            <serviceBehaviors>
                <behavior>
                    <serviceMetadata httpGetEnabled="false" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                    <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="NoRetry" connectionStringName="ProductionApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
                    <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
                    <workflowUnhandledException action="AbandonAndSuspend" />
                    <workflowIdle timeToPersist="00:00:00" timeToUnload="00:01:00" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
    </system.webServer>
    <microsoft.applicationServer>
        <monitoring lockElements="bulkCopyProviders, collectors">
            <default enabled="true" connectionStringName="workflowStoreConnectionString" monitoringLevel="HealthMonitoring" />
        </monitoring>
        <persistence>
            <instanceStores>
                <remove name="defaultSqlPersistenceStore" />
                <add name="defaultSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="workflowStoreConnectionString" />
            </instanceStores>
        </persistence>
        <hosting>
            <serviceManagement endpointConfiguration="ServiceManagementNetPipeEndpoint" enabled="false" />
        </hosting>
    </microsoft.applicationServer>
    <connectionStrings>
        <add connectionString="BigSecret" name="workflowStoreConnectionString" />
    </connectionStrings>
</configuration>

Dev Web.Config - Same as Production but with different connection string

Any help in resolving the error messages and being able to view the persisted instances is appreciated. TIA. JH

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏雨凉 2024-11-13 03:53:13

事实证明,该问题是由于 msi 安装程序未正确运行 sql 脚本而导致的,无提示地失败,从而丢失了一些表。手动重新运行脚本(位于 C:\windows\System32\AppFabric\Schema 中的 Create_Persistence_Schema.sql、Create_Persistence_Logic.sql、Create_Monitoring_Schema.sql 和 Create_Monitoring_Logic.sql)纠正了该问题。

Turns out the issue was the result of the msi installer not properly running the sql scripts, failing silently and thus missing some of the tables. Re-running the scripts manually (Create_Persistence_Schema.sql, Create_Persistence_Logic.sql, Create_Monitoring_Schema.sql and Create_Monitoring_Logic.sql located in C:\windows\System32\AppFabric\Schema) corrected the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文