A new home

I’ve made the move to WordPress!

You should be automatically redirected in 5 seconds. Please visit World Wide Code on Wordpress

Hope to see you there!

Saturday, October 8, 2011

How to: Use a Background Worker


In Silverlight, there is a BackgroundWorker class that provides a mechanism to perform time consuming tasks on a background thread.
The BackgroundWorker also allows you to report progress back to the UI thread and also cancel the on going operation.
Here are some steps about how to use the background worker.

Azure Storage Explorer

Windows Azure gives you four core storage services that are secure, scalable and easy to access that remain persistent and durable storage in the cloud.

Azure Storage Explorer


Azure Storage Explorer is a useful GUI tool for inspecting and altering the data in your Windows Azure Storage storage projects including the logs of your cloud-hosted applications.
All 3 types of cloud storage can be viewed and edited: blobs, queues, and tables.

Web Aunthentication Error in Metro Apps


Metro apps in Windows 8 can make use of Web Authentication using the WinRT API.
You may encounter errors while using the AuthenticateAsync method from the WebAuthenticationBroker inside your Metro App.
The Error returned is usually similar, for example
Error returned by WebAuth broker. Error Number: – 2146697211 Error Message: Unknown runtime error.
You must be connected to the internet.

Windows 8: Web Authentication in Metro Apps


You may have used  OAuth 2.0 protocol for authentication and authorization in your Desktop or web based apps. Now, you would like to build a Metro app for Windows 8 which requires web authentication.
For this purpose, there exists a Web Authentication WinRT API do perform the required task.
The web authentication can be performed using C# as well as JavaScript. 

The Past, Present and Future of Parallelizing .NET Applications


In the MSDN magazine article, Stephen Toub explains the use of parallel tasks like PLINQ in .Net 4.0. I recommend reading this article to get some insights on parallel operations whether you use them or not in your applications.
With the Parallel class, you can parallelize it simply as follows:
  1. Parallel.For(0, N, i => {
  2.   … // Process i here
  3. });
Here, the developer is still responsible for ensuring each iteration of the loop is in fact independent, but beyond that, the Parallel.For construct handles all aspects of this loop’s parallelization.

Stephen Toub is a principal architect on the Parallel Computing Platform team at Microsoft.