我在同一个虚拟机上的两个不同虚拟目录上设置了dev和prod环境,并在Configuring Multiple WMS Instances之后尝试正确设置它们。它们似乎工作正常,因为我可以看到工作流实例基于连接到它们的客户端持久保存在适当的环境中。尝试在IIS管理器中查看持久化实例时出现问题。我收到以下错误:
IIS Error Displayed when trying to look at persisted instances
Error message presented when clicking on "Error(s) encountered" link
(*我道歉,我不知道如何将图片直接上传到这篇文章中*)
我的相关配置文件如下:
默认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>
制作网站.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。 JH
答案 0 :(得分:1)
原来问题是msi安装程序没有正确运行sql脚本的结果,无声地失败并因此丢失了一些表。手动重新运行脚本(位于C:\ windows \ System32 \ AppFabric \ Schema中的Create_Persistence_Schema.sql,Create_Persistence_Logic.sql,Create_Monitoring_Schema.sql和Create_Monitoring_Logic.sql)纠正了该问题。