Hi Ron, great blog and great examples! I have some questions about your example... Lets imagine that instead of just counting and sleeping in main work brunch we do some "real" job and activity that doing the job takes some time for execution (lets say couple minutes). What will happen in this case? Will it be possible to get access to Query branch when the activity is working? Or it will will be blocked because of one thread? What if activity is asynchronous, will your example continue working? What is your suggestion if it's necessary to do some long running activities in the loop and control the number of that amount of job already done (some king of progress bar)?
If your worker activities are I/O bound rather than CPU bound be sure to build them using AsyncCodeActivi
ty. This will allow the workflow to access the Query branch even when work is going on. Another option would be to simply call a service (using Async calls) that sends the work somewhere else. Be sure to take a look at the blog series I wrote on WF4 and Task Parallelism (http://blogs.m sdn.com/b/rjaco bs/archive/2011 /06/28/the-work flow-parallel-a ctivity-and-tas k-parallelism.a spx) for more.
Thanks, Ron. I just tried asynchronous activity and it works well.
If we can have more than one xamlx in one project, how do we set up the web.config to make the other xamlx available?
XAMLX files are like .ASPX files. You don't have to have seperate config entries for them. You can have as many as you like. The XAMLX Workflow Service does have a configuration name property if you want to set this in order to use a <service> tag in the config file.
I try to modify the TraceBatchWork.
cs to call my function to write a file to a folder. I get an "UnauthorizedAc cessException" for "Access to the path is denied". So I grant a full permissions for IUSR and ASP .NET to the folder, but I still get an exception. Under the IIS Authentication, I saw the Anonymous Authentication is Enabled and the Specific user is "IUSR". Is there other account i should add to the folder?
Try NETWORK SERVICE
Ron Thank you for your help. I find my problem, it is due to my application pool identities is ASP.NET v4.0 instead of DefaultAppPool. It work once I add the ASP.NET v4.0 to the Security of the folder. Please see the following link : http://learn.ii
s.net/page.aspx /624/applicatio n-pool-identiti es/
I can run the WEBBatch from my computer and it had updated the AppFabricMonito
ringDB on the first day I run the program. Also I can see three autostart batch job running. However, today I start the program from the VS2010, I can Submit Batch and it will show up on the Submitted Jobs gridview. But it don't show up on the other two gridview and not update the AppFabricMonito ringDB. Am I broke the connections string?
Just curious are you using AppFabric 1.0 or 1.1?
I look at my Web Platform Installer 3.0 to find out that my Windows Server AppFabric Released on 7/23/2010, since I install the AppFabric through the Web Platform Installer. Other than that I cannot find any version number from the App. Would you mind to point me where I can find the Version number.
Ok After I double click on it, It said the version is 1.0.2034.2
I see the BatchWorker will write the data to the database AppFabricPersis
tenceDB when i submit the batch and it will delete the record after it done, but it won't write to AppFabricMonito ringDB. Also I get the following error message "Unable to connect to the database used by the following application(s) (Default Web Site/BatchWeb). Dropping event with event ID 108. This event has occurred 63 times." from the Administrative Events log.
From the IIS Manager, I can see the ConnectionStrin
g for the "ApplicationSer verMonitoringCo nnectionString" is "Data Source=SALExxxx 2\SQL2008;Initi al Catalog=AppFabr icMonitoringDB; Integrated Security=True" and the Entry Path is "MACHINE/WEBROO T"
Go to all programs through the start menu and open the help for app fabric and it will say the version there. Mine is "Appfabric 1.1 for Windows Server"
I saw a issue. I find out that my SQL Server Agent is not auto start when I reboot my computer. Once I start the SQL Server Agent, the record is update to the AppFabricMonito
I am running appfabric 1.1. I think that may be my issue with this sample, but not sure. I can run it locally on my computer but cannot get it to auto start.
I have replicated all the code in a new project on my computer, one this is that when I try to add my service reference locally I do not get any method for the proxy called BatchWorkerClie
nt there fore I cannot invoke SubmitJob. In my config file I noticed that when I add the service reference it doesn't look completely like the example. It is putting in a http address for the service reference instead of the net.pipe address. Any help would be appreciated. Thanks!
When you add a service reference http:// is used by default. You can switch it to net.pipe:// if you want but you have to be sure net.pipe is enabled in your IIS application (this is required for AppFabric anyway).
So in your solution did you add the net.pipe:// protocol in your web config manually. I do have net.pipe enabled in IIS for this website and I still didn't get BatchWorkerClie
nt method auto generated in the reference.cs file.
Ok I when I add the service reference I put in http://batchweb
/BatchWorker/Ba tchWorker.xamlx and name my service reference "Services". It automatically added the endpoint and the bindings for net.pipe. However, I still don't get the method BatchWorkerClie nt in auto generated in the Reference.cs to call from the BatchAutoStartF actory. The only methods it generated was SubmitJob, StopJob and QueryJob. Thanks for your help.
nt is in the BatchWeb\Servic e Refererences\Re ferences.cs file of the source code for this sample.
Yes I understand that. But when I add the service reference it is not automatically produced in my Reference.cs file. I have your sample running locally, but I cannot get it to auto start. IIS is set up as enable auto start.
I install the Windows Server AppFabric and run the Configure AppFabric too. But the fields it create on the ASWfEventsTable is less then the one you have. Also you can see that the table name is deferent too. Am I running the correct Version? Thanks!
AppFabric 1.1 was recently released - could it be that you are using that version? I haven't looked to see if the tables are different in the 1.1 release.
Thank you for the quick reply. I find it is my problem. I should look at the Views first.
Hi, thanks for the post. I don't have much experience with ASP.Net but I want to get this example running to play around with. What are the manual changes I need to make in order to run this? I changed database connection string in web.config file but it complains about dbo.ASWfInstanc
es not found. thanks!
You need to install and configure Windows Server AppFabric with AppFabricPersis
tenceDB and AppFabricMonito ringDB on (localhost)\SQL Express. Use the Configure AppFabric tool to do this.