AppFabric worked great with VS 2010 RC but if you install VS 2010 RTM and try to install AppFabric you get an error message.
The bad news are: "there is no workaround". The good news are that by the end of june we will have the RTM version of AppFabric that will work with VS 2010 RTM.
There is no escape but to hang on and wait.
Manu
Windows Identity Foundation (WIF) was released few month ago. The companion SDK was released for VS 2008. Unfortunately there are numerous issues when trying to use it with VS 2010. There was a promise in the WIF blog that a new version will be released in the RTM timeframe but unfortunately it was not fulfilled yet.
"Add STS reference" just does not work. WIF does not recognize WCF services on the cloud and the list goes on…
There are work around for every scenario but it just looks bad.
I am waiting…
Manu
To deploy an application to windows azure cloud you need first to open an account.
In the portal https://windows.azure.com you have to create two types of accounts:
1. A storage account – For azure storage
2. A Hosted Services account – For hosting applications
For detailed step by step explanation I encourage you to go through the Lab "IntroductionToWindowsAzure" provided in the Windows Azure Platform Training Kit.
Visual studio provides an easy configuration panel for your application.
Just click properties on your selected role and start configuring…
As you can see certificates can also be uploaded. You can use them in configuring SSL. You can configure the store name and location so certificate chains can be created. Peer Trust is not possible though. More on that on later posts.

One of the first questions I am being asked whenever I present windows azure is: How to read monitoring and diagnostics.
Well Windows azure is quite powerful concerning diagnostics. Every role can contain a diagnostic monitor agent that can be started using: DiagnosticMonitor.Start . The agent collects diagnostic information according to the configuration you supply. The information must be persisted somewhere for us to be able to watch it. So someone needs to tell the agent to save its information to azure storage.
There are two ways to do that.
1.Configure a persistence period for each type of information. The agent will persist the data in the rate you define.
2. Call the agent from the outside using REST and instruct the agent to persist on demand.
In this code snippet I demonstrate how to configure the persistence rate and the information to be collected.
// Get default initial configuration.
var diagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();
// Capture complete crash dumps
Microsoft.WindowsAzure.Diagnostics.CrashDumps.EnableCollection(true);
//Set filter and sampling persistence rate. diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Error;
diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
diagConfig.Directories.ScheduledTransferPeriod =
TimeSpan.FromMinutes(1.0);
diagConfig.Logs.ScheduledTransferPeriod =
TimeSpan.FromMinutes(1.0);
diagConfig.WindowsEventLog.ScheduledTransferPeriod =
TimeSpan.FromMinutes(1.0);
diagConfig.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
// Adding performance counters to the default diagnostic configuration
PerformanceCounterConfiguration procTimeConfig = new PerformanceCounterConfiguration();
procTimeConfig.CounterSpecifier = @"\Processor(*)\% Processor Time";
procTimeConfig.SampleRate = System.TimeSpan.FromSeconds(1.0);
diagConfig.PerformanceCounters.DataSources.Add(procTimeConfig);
// Adding performance counters to the default diagnostic configuration
PerformanceCounterConfiguration diskBytesConfig = new PerformanceCounterConfiguration();
diskBytesConfig.CounterSpecifier = @"\LogicalDisk(*)\Disk Bytes/sec";
diskBytesConfig.SampleRate = System.TimeSpan.FromSeconds(1.0);
diagConfig.PerformanceCounters.DataSources.Add(diskBytesConfig);
PerformanceCounterConfiguration workingSetConfig = new PerformanceCounterConfiguration();
workingSetConfig.CounterSpecifier = @"\Process(" +
System.Diagnostics.Process.GetCurrentProcess().ProcessName +
@")\Working Set";
workingSetConfig.SampleRate = System.TimeSpan.FromSeconds(1.0);
diagConfig.PerformanceCounters.DataSources.Add(workingSetConfig);
// Buffer event logs locally
diagConfig.WindowsEventLog.DataSources.Add("System!*");
diagConfig.WindowsEventLog.DataSources.Add("Application!*");
// Start the diagnostic monitor with the modified configuration.
DiagnosticMonitor.Start("DiagnosticsConnectionString", diagConfig);
The information is persisted into storage blobs and tables depending on the information type. The compete listing of storage locations can be found here. The tables are created automatically so you do not have to worry about creating them.
To look at the storage I use a tool called: Azure Storage Explorer
Here I present Windows Event Logs:

In WF 3.5 we all remember the the feature called dynamic binding parameters which allowed to dynamically create new dependency properties. Guy Burstein wrote an excellent blog describing dynamic binding parameters in WF 3.5.
With dynamic binding parameters the developer could set a certain property and the designer would dynamically create new properties according to some logic.
For example: An activity can have a property in which the workflow developer enters a name of a type. The activity explores the type using reflection and create new properties per each property in the type.
The question is how to accomplish the same experience in WF 4.0.
WF 4.0 uses a new model. In WF 4.0 there are no dependency properties. Activities use a much simpler model in which data is written to variables and arguments. So the question is how to create variables or arguments dynamically.
In WF 4.0 activities design is split to two separate dimensions:
1. The activity logic
2. The activity designer.
The activity designer is a simple WPF canvas. (WPF provides endless opportunities) but if we dig a little we find out that it is actually a WorkflowViewElement implementation. This class provides the gap between the activity implementation and the activity designer.
WorkflowViewElement Has a property called ModelItem that will do the job.
Looking at the definition of the Clsss ModelItem we can see how it describes each element in the activity tree.
The ModelItem class represents a single item in the editing model. An item can be anything from a window or a control down to a color or an integer. You may access the item’s properties through its Properties collection and make changes to the values of the properties.
public abstract class ModelItem : INotifyPropertyChanged
{
[TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
protected ModelItem();
public abstract AttributeCollection Attributes { get; }
public abstract ModelProperty Content { get; }
public abstract Type ItemType { get; }
public abstract string Name { get; set; }
public abstract ModelItem Parent { get; }
public abstract IEnumerable<ModelItem> Parents { get; }
public abstract ModelPropertyCollection Properties { get; }
public abstract ModelItem Root { get; }
public abstract ModelProperty Source { get; }
public abstract IEnumerable<ModelProperty> Sources { get; }
public abstract DependencyObject View { get; }
public abstract event PropertyChangedEventHandler PropertyChanged;
public abstract ModelEditingScope BeginEdit();
public abstract ModelEditingScope BeginEdit(string description);
public abstract object GetCurrentValue();
public override string ToString();
}
To respond to property change event (The developer set a certain property of the activity) we have to register to ModelItem.PropertyChanged event.
To create new variables \ arguments we will use : ModelItem.Properties
ModelItem.Properties allows to access each of the activity's properties.
To create new variables dynamically we need to create a property of collection of variables in our activity. To create a new dynamic variable all we need to do is to create an instance of a variable and add it to this collection.
this.ModelItem.Properties["Variables"].Collection.Add(new Variable<string> { Name = "VatiableName" });
To summarize I attach a sample activity and the designer:
<sap:ActivityDesigner x:Class="DynamicActivityLibrary.DynamicActivityDesigner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation">
<Grid>
</Grid>
</sap:ActivityDesigner>
// Interaction logic for DynamicActivityDesigner.xaml
public partial class DynamicActivityDesigner
{
private static List<string> newVariables = new List<string>();
public DynamicActivityDesigner()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(DynamicActivityDesigner_Loaded);
}
public void DynamicActivityDesigner_Loaded(object sender, RoutedEventArgs e)
{
this.ModelItem.PropertyChanged +=
new PropertyChangedEventHandler(Value_PropertyChanged);
}
void Value_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (this.ModelItem.Properties["Text"].ComputedValue != null)
{
if (this.ModelItem.Properties["Text"].ComputedValue.ToString() == "person")
{
if (!newVariables.Contains("personName"))
{
this.ModelItem.Properties["Variables"].Collection.Add(new Variable<string> { Name = "personName" });
this.ModelItem.Properties["Arguments"].Collection.Add(new InArgument<string>());
newVariables.Add("personName");
}
}
else if (this.ModelItem.Properties["Text"].ComputedValue.ToString() == "employee")
{
if (!newVariables.Contains("employeeName"))
{
this.ModelItem.Properties["Variables"].Collection.Add(new Variable<string> { Name = "employee" });
this.ModelItem.Properties["Arguments"].Collection.Add(new InArgument<string>());
newVariables.Add("employeeName");
}
}
}
}
}
Now the activity code:
[Designer(typeof(DynamicActivityDesigner))]
public class MyDynamicActivity : NativeActivity
{
Collection<Variable> variables;
Collection<InArgument<string>> arguments;
string text;
[Browsable(false)]
public Collection<Variable> Variables
{
get
{
if (this.variables == null)
{
variables = new Collection<Variable>();
}
return variables;
}
}
[Browsable(false)]
public Collection<InArgument<string>> Arguments
{
get
{
if (this.arguments == null)
{
arguments = new Collection<InArgument<string>>();
}
return arguments;
}
}
public string Text
{
get
{
return text;
}
set
{
text = value;
}
}
public MyDynamicActivity()
: base()
{
text = string.Empty;
}
protected override void Execute(NativeActivityContext context)
{
}
}