Thursday, August 12, 2010

Test Appfabric on windows 7

Let me start from my New IIS7 ultimate dev machine, I’ve installed VS 2010 And SQL Server 2008 R2 dev version. you don’t need to read the installation guide in order to start the appfabric programming.

> it require four major components, just install them and ready to run.

  • .net runtime 4.0
  • IIS 7 or above and some admin packages ( The IIS 7.0 Manager for Remote Administration is required for managing remote IIS servers)
  • SQL server ( monitoring data storage, and workflow persistence storage.)
  • Appfabric Runtime (some .net assemblies)

First Make sure, .NET Framework 4.0 Is installed. ( if you want to do some development on appfabric, vs 2010 setup will install the .net framework 4.0 for you.), you can check the Microsoft.net folder quickly.

image

then enable IIS 7 and some other features as well.
Run “optionalfeatures” simply, and chose the IIS7 features and WAS 
 image

image

then download and install the IIS 7 Manager for Remote Administration , you can download here. 
http://go.microsoft.com/fwlink/?LinkId=182018

in the right bottom, select the right version for you cpu architecture. if you don’t want to use the webplatform installer.
image 
once done, start the IIS admin , you will have the connect to remote server context menu.
image
 

Download and install APPfabric runtime from msdn. http://www.microsoft.com/downloads/details.aspx?FamilyID=467e5aa5-c25b-4c80-a6d2-9f8fb0f337d2&displaylang=en

pay attention to the bits, if you are using windows 7 x64, chose the WindowsServerAppFabricSetup_x64_6.1.exe
and WindowsServerAppFabricSetup_x86_6.1.exe for x86

image

for me, I use the x64 version. I will select all the features during the setup
image

once finished, it will popup the configuration GUI. all the bits are been installed to C:\Windows\System32\AppFabric. if you missed the configuration, start up the configuration exe manually.
image 

for the configuration part, basically it just need to create the Database to hold the Monitoring data and WF service(persistence,tracking db.)
By default , it ships with the default SQl style provider for monitoring and persistence. all you need to do is point to the right service account and DB server.
once done, it may promp you to start up the SQL Agent in order to show statistics on the dashboard. [ why? after enable monitoring, The wcf runtime to dump etw log, and put it to a staging table, there are some SQL job needed to import the data from staging table to the query table.)
image

you may skip the cache configuration at this point.

then open the IIS manager, you should be able to see the Appfabric Dashboard add-in for IIS. we are done.
image

what happened under the hood? 
It created 3 databases
installed some Assemblies and put them to GAC
changed web.config and ApplicationHost.config to inject the monitoring logic.
how?
     WCF 4.0 comes with new features called Default Configuration (default binding, default behaviors), so the new config will add some new behavior which will be picked up by all application excepty you clear those behaviors explicitly. you may check the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
   image

and add some diagnostics listeners. wf tracking profile and persistence instances.

Now let’s write a helloAppfabric Application , and deploy it to the “fabric”. first create a new wcf web project.

   image

click Ok, if you get the error says asp.net 4.0 is not configurated for IIS.
image
run the asp.net 4.0 registration utility. go to the framework v4 folder.
image 

then the project is created, browser the svc directly. http://localhost/HelloFabric/Service.svc
after that, Open IIS fabric dashboard. you see nothing.
All counter is zero.
image

when you get this , make sure to start up the sql agent and run the refresh again. You will see the counter is increased
image

then you can play more with the appfabric. select one Application, richt click to manage the appfabric behavior.
image

No comments:

 
Locations of visitors to this page