A list of readings on async programming

Understanding the SynchronizationContext in ASP.NET

http://vegetarianprogrammer.blogspot.com/2012/12/understanding-synchronizationcontext-in.html

It’s All About the SynchronizationContext

http://msdn.microsoft.com/en-us/magazine/gg598924.aspx

Don’t Block on Async Code

http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html

ExecutionContext vs SynchronizationContext

http://blogs.msdn.com/b/pfxteam/archive/2012/06/15/executioncontext-vs-synchronizationcontext.aspx

A list of readings on async programming

Something I should have been aware of two years ago

I really wish I have known about these changes two years ago. So that I can save some hours for resolving a weird gacutil issue.

http://blogs.msdn.com/b/mjeelani/archive/2010/06/07/top-2-things-you-should-know-about-the-global-assembly-cache-gac-in-net-4-0.aspx

http://blogs.msdn.com/b/astebner/archive/2006/11/04/why-to-not-use-gacutil-exe-in-an-application-setup.aspx

http://blogs.iis.net/davcox/archive/2009/07/14/where-is-gacutil-exe.aspx

Hope this helps,

-Jack

Something I should have been aware of two years ago

If you don’t want to use one input method for all

I’m using Windows 8 for my regular daily work. I’m also using English as the display language and most time I type English for almost everything. However, I’m a Chinese and from time to time I need to type Chinese, for example, in the IM message window to chat with my friends. So that, of course I have Chinese language and its IMEs installed.

Not like in the previous versions of Windows, Windows 8 now uses Win+space hotkey to switch between the IMEs. The beloved years of Ctrl+space experience disappears, suddenly. And, another damn thing I really hate is, once I switch the IME, all running applications now are with that IME, meaning that I have to switch again and again between English input and Chinese input, once after I chat with a friend when I have to type Chinese.

So today I’m enough with these switches and spent some little time on the language configurations of Windows 8 and it turns out I can get the comfortable experience back. Smile

Just go to the Change your language preferences window, open the Advanced settings option, and turn on the Let me set a different input method for each app window option. Then log off and re-login, and voilà, all the familiar behaviors are back!

Hope this helps,

-Jack

If you don’t want to use one input method for all

LocalResource for Diagnostics, the size config matters

In one of my Azure projects, we use local storage to temporarily store some logging data files and then leverage the Windows Azure Diagnostics (WAD) to transfer these files to a storage account.

We encountered a weird problem when we tried to configure the size for the abovementioned local resource. I’ll call it LocalStorageLogDump as below. My initial thinking of this sizeInMB configuration is that as long as it is below the limit of the virtual machine’s local storage size, which is about 200GB for a small instance, it should be just fine. However, when I put a 5000MB (5GB) in the config, it failed to start the diagnostics monitor.

By reflectoring the diagnostic assembly and later reading the following article, I then realized, the local resource that is used for WAD, has to be less than the size of a local resource named DiagnosticStore which by default is 4GB and not in the .csdef file. Then after I explicitly added that configuration entry and gave it a larger value, WAD comes back to work.

http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.diagnostics.diagnosticmonitorconfiguration.overallquotainmb.aspx

<LocalResources>
<LocalStorage name=”LocalStorageLogDump” cleanOnRoleRecycle=”true” sizeInMB=”5000″ />
<LocalStorage name=”DiagnosticStore” cleanOnRoleRecycle=”false” sizeInMB=”10000” />
</LocalResources>

[Update: 9/16/2013]

The cleanOnRoleRecycle attribute is better with a “false” value, according to this post, in case you encountered the same/similar issues.

LocalResource for Diagnostics, the size config matters

A tool to simplify and automate your SQL Azure database backup

So you have one or more SQL Azure databases that have data stored you treat really seriously and want to back them up on a regular basis like what you usually do for on-premises databases. However, the backup/restore story in Azure is different from on-premises. What you can do is to leverage the existing options provided by Azure platform. Following is a list of references you want to check out.

Business Continuity in SQL Azure
http://msdn.microsoft.com/en-us/library/windowsazure/hh852669.aspx

SQL Azure Backup and Restore Strategy
http://social.technet.microsoft.com/wiki/contents/articles/1792.sql-azure-backup-and-restore-strategy.aspx

How to Use Data-Tier Application Import and Export with SQL Azure
http://social.technet.microsoft.com/wiki/contents/articles/2639.aspx

Copying Databases in SQL Azure
http://msdn.microsoft.com/en-us/library/windowsazure/ff951624.aspx

However, if you really want to automate the backup operation and save some manual efforts, you then need to write some codes/scripts to orchestrate all these existing options and maximize the overall goodness that you can get from these options.

Now, here is the good news, a tool (SQL Azure Data Protector) is created for you just to do all these things. What you only need to do is:

  • Download and install the little tool on a machine that usually schedules Ops tasks for you
  • Create a profile (configurations like server names, credentials, locations, storage account, etc.)
  • Schedule a periodic task using, for example, Windows Task Scheduler

If you want to understand more details about how this tool works, you can read the documents. Of course, you can also check out the source codes directly, as well.

Till next time,

-Jack

A tool to simplify and automate your SQL Azure database backup

win 8 doesn’t like WEP Wi-Fi connection

My newly installed win 8 system failed to connect to my home Wi-Fi without any useful information provided. I tried many times, and it always failed. Then I tried to re-configure my router to change the security type to WPA2-Personal and used AES algorithm for the encryption type. And now win 8 can connect to my home Wi-Fi like a charm.

WEP is basically non-secure, so if you encountered the same issue as mine, you can try the same approach to see if it would be the rescue.

Till next time,

-Jack

win 8 doesn’t like WEP Wi-Fi connection