May 2011 - Posts
Last week the Windows Azure SDK 1.4.1 refresh was released. (SDK 1.4.1)
The most important improvement is the support for web deploy.
It was possible to execute web deploy in previous versions of the SDK but it was not easy.
Andy Cross explains how easy it is to use web deploy with the new SDK in the following post.
Installing the new SDK is a bit tricky. I recommend uninstalling the previous SDK and Windows Azure Tools for Microsoft Visual Studio and reinstalling everything using the web installer.
DO NOT INSTALL THE SDK REFRESH ONLY! RUN A CLEAN INSTALL !
Enjoy
Manu
My friend Alik Levin who works in the identity group pointed me to a list videos containing detailed demos of the Access Control Service.
In the following post you will be able to find all the updates of the ACS Code samples provides by the ACS Team
Enjoy
Manu
Enterprise Library provides many important applications blocks that can be used to simply the implementation of infrastructure most applications need. One of the most popular application block is the logging application block.
The logging application block implements a simple to use yet powerful logger.
You can plug-in listeners that will store the logs in many different locations such as file , Event log, and a database.
many applications use the flat file listener and leverage its simplicity. When migrating to Windows Azure and using a large number instances we would like to continue to use Enterprise Library and enjoy Azure Diagnostics aggregation.
It is possible to configure Windows Azure Diagnostics to collect all the files located at a specified path. In Windows Azure we cannot just write to the file system. The local storage is a location on the local disk we can use. So let us configure that everything that will be written to the local storage will be collected.
DiagnosticMonitorConfiguration diagConfig = roleInstanceDiagnosticManager.GetCurrentConfiguration();
LocalResource localResource = RoleEnvironment.GetLocalResource("MyCustomLogs");
DirectoryConfiguration dirConfig = new DirectoryConfiguration();
dirConfig.Container = "wad-my-custom-container";
dirConfig.DirectoryQuotaInMB = localResource.MaximumSizeInMegabytes;
dirConfig.Path = localResource.RootPath;
diagConfig.Directories.DataSources.Add(dirConfig);
roleInstanceDiagnosticManager.SetCurrentConfiguration(diagConfig);
Now it is time to tell Enterprise Library to set the path of the flat file listener to the LocalStorage path.
The problem is that most applications use configuration files to set Enterprise Library logging but the path of the local storage is known only at runtime.
Fortunately it is possible to configure the Enterprise Library logger programmatically. The following code shows how to use Enterprise Library logging without configuration files at all. This way you can set the path in code :
_logger = new EnterpriseLibLogger(Path.Combine(RoleEnvironment.GetLocalResource("MyCustomLogs").RootPath, "log.txt"));
public class EnterpriseLibLogger { static LogWriter _writer; public EnterpriseLibLogger(string path) { if (_writer == null) _writer = CreateWriter(path); } private LogWriter CreateWriter(string path) { string GeneralCategory = System.Diagnostics.EventLogEntryType.Information.ToString(); string ErrorCategory = System.Diagnostics.EventLogEntryType.Error.ToString(); var formatter = new TextFormatter( "Timestamp: {timestamp}{newline}" + "Category: {category}{newline}" + "Message: {message}{newline}" + "Extended Properties: {dictionary({key} - {value}{newline})}"); var logListener = new FlatFileTraceListener(path, string.Empty, string.Empty, formatter); //this source has our listener var errLogSource = new LogSource(ErrorCategory, SourceLevels.All); errLogSource.Listeners.Add(logListener); // Don't log to this source var emptyLogSource = new LogSource("Empty"); // "Error" category goes to main log source var traceSources = new Dictionary<string, LogSource> { { ErrorCategory, errLogSource } }; // filter "Error" category var categoryFilter = new CategoryFilter("Errors and Info",
new List<string> { ErrorCategory, GeneralCategory },
CategoryFilterMode.DenyAllExceptAllowed); var filters = new List<ILogFilter> { categoryFilter }; // in EntLib5 can't use LogWriter (it's abstract) or LogWriterFactory (which uses IServiceLocator) return new LogWriterImpl( //The collection of filters to use when processing an entry filters, //The trace sources to dispatch entries to traceSources, //The special LogSource to which all log entries should be logged. errLogSource, //The special LogSource to which log entries with at least one non-matching category should be logged emptyLogSource, //The special LogSource to which internal errors must be logged emptyLogSource, //The default category to set when entry categories list of a log entry is empty GeneralCategory, //The tracing status false, //true if warnings should be logged when a non-matching category is found false); } public override void LogInfo(string info, System.Diagnostics.EventLogEntryType entryType) { _writer.Write(info, entryType.ToString()); } }
Enjoy
Manu
I wrote a lot about claim based Identity and access control. One of the big challenges in claim based access control is the creation of the STS. Fortunately the Azure platform has an offering in this domain – ACS
AppFabric ACS Access Control Service implements a full STS in the cloud. It is simple yet powerful.
The team created great videos explaining ACS and their integration with WIF.
Watch and start using ACS.
Manu
CDN was originally released as a cache for Windows Azure Storage services. It clearly reduced the latency and improved performance. Now it is available not only to Azure Storage but also to Web Roles. It act much like an output cache. The first request is processed by the web role. If the request is repeated it will be served by the CDN cache network which is distributed around the world without disturbing the actual role.
Using CDN for web roles will be effective when:
- Processing is required to create the content (In contrast to static content stored in blob storage)
- The content change slowly.
- Processing is expensive to produce or far from its customers so caching will clearly enhance performance.
Establishing a CDN for hosted service is simple. The Management portal has a new "CDN" tab especially for that.
For more info I recommend reading the post Steve Marks wrote about CDN for Web Applications.
Enjoy
Manu
On May 22th I will talk about Azure security in Microsoft Israel.
The talk will be given in Hebrew and it is free !!!
I will cover the following topics:
- Introduction to security in the cloud.
- Data security.
- Identity in the cloud.
- Secure Networking.
To subscribe click here.
See you there
Manu
Geo distribution should be a basic property of Windows Azure yet up until today we could deploy our hosted services to a single data center. So where is geo distribution?
The new Traffic Manager CTP changes that.
Now we can deploy our service to a number of data centers but expose a single endpoint to our customers. After all it is only a question of DNS. Traffic Manager knows where are the deployments of our service so it will rout our customer to the best deployment according to the policy we define.
The endpoint we provide to our customers is actually the uri of the Traffic Manager policy we defined. When a local DNS server tries to resolve it the CNAME that will be provided is the real location of our service which was chosen by the Traffic Manager.
Creating a Policy is simple. No code is required. Everything is done in the portal.

For more information I recommend watching this webcast and reading the content here.
Manu
The April 2011 version of the training kit for was released!!!
download it here
The changes from the previous version are:
- NEW: Authenticating Users in a Windows Phone 7 App via ACS, OData Services and Windows Azure HOL
- NEW: Windows Azure Traffic Manager HOL
- NEW: Introduction to SQL Azure Reporting Services HOL
- UPDATED: Connecting Apps with Windows Azure Connect HOL (updated for Windows Azure Connect refresh)
- UPDATED: Windows Azure CDN HOL (updated for the Windows Azure CDN refresh)
- UPDATED: Introduction to the AppFabric ACS 2.0 HOL (updated to the production release of ACS 2.0)
- UPDATED: Use ACS to Federate with Multiple Business Identity Providers HOL (updated to the production release of ACS 2.0)
- UPDATED: Introduction to Service Bus HOL (updated to latest Windows Azure AppFabric portal)
- UPDATED: Eventing on the Service Bus HOL (updated to latest Windows Azure AppFabric portal)
- UPDATED: Service Remoting HOL (updated to latest Windows Azure AppFabric portal)
- UPDATED: Rafiki demo (updated to latest Windows Azure AppFabric portal)
- UPDATED: Service Bus demos (updated to latest Windows Azure AppFabric portal)
Enjoy
Manu