Wednesday 26 January 2011

Oakton involved in Development of Microsoft Azure Project for Queensland Government

We recently started work (a week ago) at the North Ryde Microsoft Offices on an Azure-based pledge application (www.qld.gov.au/floods/pledge). This relatively simple application supports the coordinaton of offers from private organizations and corresponding requests for help by flood-affected people in Queensland (and potentially other states affected by the floods).

As per the Australian Newspaper's IT section:

"Microsoft is helping to develop a flood-recovery pledge website for the Queensland government, which will go live later this week. It will be based on the company's Azure cloud computing technology. It has been working with partners Oakton, Devtest and Readify in its recovery program."

See original article at http://www.theaustralian.com.au/australian-it/industry-digs-deep-for-queensland-flood-recovery/story-e6frgakx-1225989795344

The solution is using the following technologies to deliver the end product:
  1. Azure Web Roles (with 2 web applications on the one Web Role, which is allowed in the latest Azure 1.3 SDK).
  2. SQL Azure, Development against local SQL Express instances on each machine, SQL Deployment and schema changes with the SQL Azure Migration tool - http://sqlazuremw.codeplex.com/
  3. Visual Studio 2010 using Data Dude Projects for Deployment
  4. ASP.NET Web Forms 4.0 (as opposed to MVC 3 which was just released and I did an initial mockup with) - with Entity Framework 4, EntityDataSource and the QueryExtender control (http://msdn.microsoft.com/en-us/library/dd537669(VS.100).aspx) , one of the new controls in .NET 4.0. We didn't use MVC based on the existing skills of the team and the short timelines.
  5. TFS 2010 with  the Agile template, using Web.Config transforms for different release builds as demonstrated in http://msdn.microsoft.com/en-us/vstudio/Video/ff801895
  6. Forms-based authentication, with a slighly modified version of the ASP.NET SQL membership and Role Provider Database Scripts (so it works on SQL Azure). This is using scripts as described in the MS KB article here:
    http://support.microsoft.com/kb/2006191/en-au
    This database can also be created by the SQL-Azure equivalent of the the aspnet_regql.exe  tool used for non-Azure applications called "aspnet_regAzure.exe".
  7. A secured SSL site for the internal Administrative application (e.g. for basic approvals and vetting).
DDK

Thursday 20 January 2011

Important Microsoft Azure Links

Here is a list of the most critical links useful if you are developing or testing out SQL Azure or Windows Azure:
  1. Azure Portal Site (using Silverlight) - for deployment and managment of the Windows Azure platform - http://windows.azure.com/
  2. SQL Azure - https://sql.azure.com/
  3. Tools and SDK - http://www.microsoft.com/windowsazure/getstarted/default.aspx
  4. Azure Billing Site - https://mocp.microsoftonline.com/
  5. Main Azure Landing Page - http://www.microsoft.com/windowsazure/
DDK

Wednesday 19 January 2011

Windows Azure and SQL Azure - Free benefits for MSDN Premium Subscribers in Australia

I've recently started an Microsoft Azure Cloud-based project for the Queensland Government through my employer Oakton. To help me get up to speed with the latest developments in Azure, an MSDN Premium subscription gives you a whole heap of free goodies (Windows Azure and SQL Azure) to test out and demonstrate with.

The details of free benefits for Australian MSDN subscribers can be found here:

http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&locale=en-AU&offer=MS-AZR-0005P

You will have to provide a credit card number if you do go over your MSDN Premium Subscription allowances - which are easily avoided if you're careful.

The following rates are current as of 19/01/2011:

MSDN Premium Subscription Benefit:

Windows Azure
750 hours of a small compute instance
10 GB of storage
1,000,000 storage transactions
SQL Azure
3 Web Edition databases (up to 1 GB relational database each)
Windows Azure platform AppFabric
1,000,000 Access Control transactions
1 pack of 5 Service Bus connections***
Data Transfers
North America and Europe (per region)
7 GBs in
14 GBs out
Asia Pacific Region
2.5 GB in
5 GB out

You may utilize up to the above amount of service each month without additional charge for 16 months following sign up for this offer as long as you maintain your MSDN Premium subscription. Any usage each month in excess of the MSDN Premium Subscription Benefit will be charged at the MSDN Premium rates. You can sign up for these Azure Benefits for your MSDN Premium subscription right here:
http://msdn.microsoft.com/en-us/subscriptions/ee461076.aspx

There is really no excuse not to try it out if you have an MSDN premium subscription!

DDK

Thursday 13 January 2011

Duet Enterprise Released and Available for Download on MSDN!


After a long wait, Duet Enterprise 1.0, Microsoft and SAP's premier framework for SAP integration with SharePoint 2010 and Office 2010 has finally been released on MSDN. At Oakton, I've been doing SAP to SharePoint integration for the last 18 months so a framework and guidance like this is quite exciting.

If you have an MSDN subscription, you can get it from here:
https://msdn.microsoft.com/en-us/subscriptions/securedownloads/default.aspx
Also note that this is not the ONLY way to integrate and alternatives like just using out of the box SharePoint 2010 BCS (Business Connectivity Services), or the Biztalk SAP Adapters Packs are the way to go. It really depends on your requirements. Duet Enterprise provides a few sample scenarios as part of the framework to get you started as a model for integration guidance.

Here is a high level architecture diagram in case you're completely unfamiliar with the product (it requires and utilizes SharePoint 2010 BCS under the covers) :


Basically, Duet Enterprise gives you a head-start in terms of plumbing when you start a new SAP-SharePoint Integration project. It includes the following:
  1. A framework for building SAP-SharePoint-Office Integration Scenarios
  2. SAP Workflow Integration from SharePoint (though this is not using SAP BPM)
  3. Some Pre-canned Site Templates for certain scenarios like retrieving Customer Information through SharePoint
  4. Components to allow retrieval of SAP reports from SharePoint
  5. Duet Enterprise Document collaboration functionality
  6. Communication Monitoring and Support Components to make troubleshooting easier.
  7. A security framework for authorization purposes.
There are a couple of known issues with the release (not absolute showstoppers for my clients, but you should be aware of them):

Known Issue (1):


Aggregator Web Part will not work across the Web Apps having different Authentication
Description: Aggregator Web Part is deliverable of the Duet Workflow Feature. This Web Part will provide a support to view the Task for particular user across the Site Collection and Web App.


Current Limitation to the web Part - This Web Part cannot support the Scenario of Web Part is created in one type of authenticated Web App and the Rootsite Parameter pointing to the different Web App which if different authentication. Eg: Web Part placed in Win Claims based Web App can pull/show the task assigned to the User under another rootsite created in another win claim Web App but it will not work for the rootsite created in Win Legacy Web App and then the Page on which Web Part is placed will not accessible.


Viewing the Tasks from the Cross Auth Web App in aggregator web part is not Supported


Workaround: To Fix the Page which is caused by cross authentication issue in Aggregator Web Part in the Page is to remove the web Part through SPD and then add the Aggregator web Part and point only to the rootsite accessible and same authenticated.


Known Issue (2):
Task with attachments cannot be created and assigned to users in Turkish environment.


The following languages are included in this product: Arabic, Chinese-Simplified, Chinese-Traditional, English, French, German, Hebrew, Italian, Japanese, Portuguese-Brazil, Russian, Spanish, and Turkish.


Microsoft will be having some official launch announcements soon and I'll be covering Duet in more detail in later blog posts.

DDK

Wednesday 12 January 2011

SharePoint 2007 and SharePoint 2010 Best Practice - Run SPDisposeCheck as part of your Build process with an Error Condition

One of the most common (and frustrating) sources of memory leak issues in SharePoint 2007 and SharePoint 2010 applications lies in the incorrect disposal of objects with unmanaged components. Memory leak issues typically show themselves in symptoms like:
  1. Excessive paging on the server and low memory issues
  2. The IIS application pools recycling themselves repeatedly
  3. Generally sluggish performance for end users (as the RAM gets eaten up by referenced SharePoint objects)
Why doesn't the .NET garbage collector clean them out of memory? Because the .NET objects are typically small - but it's the unmanaged (invisible to the .NET framework) that ravenously consumes your server's precious memory.

So what objects normally cause these issues? The prime suspects are normally undisposed instances of the SPSite and SPWeb classes - as detailed extensively on MSDN here:
http://msdn.microsoft.com/en-us/library/ee557362.aspx

I'm a firm believer in automated testing and code auditing tools - so to preemptively avoid such issues with disposal of unmanaged objects, I recommend to all of my SharePoint clients that you must have SPDispose check as part of your regular build process in any SharePoint Project. This avoids any existing code or any new code killing your SharePoint Farm with "unmanaged object bloat".

As described by the SPDisposeCheck documentation:
"SPDisposeCheck is a tool to help you to check your assemblies that use the SharePoint API so that you can build better code. It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code. Further investigation is advised if you continue to experience issues.  New features in this release include VS 2008 and 2008 add-in, added “Do Not Dispose Rules”, bug fixes, and updated for WSS 3.0 / MOSS 2007 and SPF / SharePoint Server 2010. "

The great thing about this latest release is that it will even tell you when you are unneccesarily disposing your SharePoint objects.

I didn't have much luck with the Visual Studio Add-in in the latest version of SPDisposeCheck (it would never run a check). As an alternative, I suggest you implement this command as part of your After build in project properties for each of your projects:

"C:\Program Files (x86)\Microsoft\SharePoint Dispose Check\SPDisposeCheck.exe" "$(TargetPath)"


[Alternatively, you can copy the executable to a solution folder and use a relative path]. This commandline will fail the project (returning a non-zero value) if there are any problems - preventing a build from occurring unless the problem is fixed or you use the "SPDisposeCheckIgnoreAttribute" on your method. Unfortunately there are no binaries currently to reference so you can consume this attribute in your code. Instead, you can obtain the source code for the SPDisposeCheckIgnoreAttribute from the following directory once you've installed the SPDisposeCheck msi:

C:\Program Files (x86)\Microsoft\SharePoint Dispose Check\SPDisposeExamplesSource.zip\SPDisposeExamplesSource
DDK