2011-08-11 117 views
0

我一直在使用Windows Workflow(WF)和SqlWorkflowPersistenceService。我已成功创建了一个使用WF和SqlWorkflowPersistenceService的原型应用程序,该应用程序在我的登录和集成安全性下运行的WebDev服务中运行时工作正常。WF与SqlWorkflowPersistenceService托管在IIS中

然后,我将代码移至IIS 5.1中托管的项目。在此环境中加载SqlWorkflowPersistenceService时,SqlWorkflowPersistenceService会尝试使用\ ASPNET用户对数据库进行身份验证。我的问题是,有没有办法使用模拟在IIS中实例化WorkflowRuntime?

仅供参考,此外,我尝试切换连接字符串以使用SqlLogin用户标识和密码。 SqlWorkflowPersistenceService无法使用此登录。任何人都知道是否有问题使用SqlWorkflowPersistenceService的SQL登录?

回答

0

对不起,迟到的回应。当在运行在IIS中的web服务中承载工作流服务时,以下工作原理。只需将该部分添加到您的网络配置文件中:

<WorkflowRuntime> 
    <Services> 
     <add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService,System.Workflow.Runtime,Version=3.0.00000.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" 
      useActiveTimers="true"/> 
     <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService,System.Workflow.Runtime,Version=3.0.00000.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" 
      UnloadOnIdle="true" 
      LoadIntervalSeconds="5" 
      ConnectionString="Initial Catalog=yourdatabase;Data Source=yourserver;User ID=youruser;Password=yourpassword;"/> 
    </Services> 
</WorkflowRuntime>