Fix Hyper-V Time Synchronization Issue

by Weijie JIN

We’re running Windows Server 2008 R2 for host and Windows Server 2008 R2 as a virtual machine using Hyper-V. For some reason, the time synchronization doesn’t work well. No matter we disable the hyper-v time synchronization option on the host side or enable it. After the gap is more than 5 seconds, some issues will […]

Read the full article →

Optimize WordPress Speed Hosted on IIS

by Weijie JIN

If you’re interested in getting high score in ySlow or PageSpeed for your blog and your blog happens being hosted on IIS of Windows Server, here are some tips: 1. Enable gzip a. To enable gzip on IIS, first add Dynamic Content Compression Role Services for IIS. b. If your site is running with Application […]

Read the full article →

Fix “The invoked member is not supported in a dynamic assembly.” Error in Tracing and Caching Provider Wrappers for Entity Framework

by Weijie JIN

When using Tracing and Caching Provider Wrappers for Entity Framework in ASP.Net MVC project, you may encounter the following error: The invoked member is not supported in a dynamic assembly.   This error is caused by GetManifestResourceStream method in Assembly does not support dynamic assembly. To fix this error, go to line 184 @ EFProviderWrapperToolkit\EntityConnectionWrapperUtils.cs,  […]

Read the full article →

Use Git to perform daily backup

by Weijie JIN

You can use git to perform scheduled backup for your file, for example, backup a site deploy. For example, I want to backup a site named MVC4 I use git + script + scheduled task to do the backup, the advantage of this approach is that: Each backup can be compared for changes. Save disk […]

Read the full article →

Multi-Language for ASP.Net Website Project using Satellite Assembly

by Weijie JIN

Satellite assembly introduction A satellite assembly is a compiled library (DLL) that contains (“localizable”) resources such as strings, bitmaps, etc. You are likely to use them when creating a multilingual (UI) application. Satellite assemblies provide you with the capability of designing and deploying your solution to multiple cultures, rather than hard coding strings, bitmaps, etc., […]

Read the full article →

.Net Build System for Sublime Text 2

by Weijie JIN

Sublime text 2 is a great text editor that every develop should get a copy at least give a try. I create a build script for .net in sublime text 2. It can do the following things: Build source code into .exe file under your sublime project folder recursively. Add reference DLLs while building source […]

Read the full article →

Step by Step Setup Git Server on Windows with CopSSH + msysGit and Integrate Git with Visual Studio

by Weijie JIN

First of all, let me clarify that Git doesn’t need to specify the side for client and server. Your workstation can be both the client and server. That means you can get code from other computer, you’re the client; while others can also get code from your computer, you’re the server. That’s why Git is […]

Read the full article →

Migrate/Move Albums of Picasa Desktop Application

by Weijie JIN

Scenario I have a new computer and I want to move the Picasa(It’s the desktop application, not online album) album from my old computer to the new computer. The photos are the same, but the root folder is different. In this case, the old location is on the desktop, and the new location will be […]

Read the full article →

Modify Nextgen Gallery to Extract Picasa’s Caption

by Weijie JIN

I use Picasa to manage my photos locally and Nextgen gallery(a wordpress plugin) as my online photo albums. And in Picasa, captions can be added to photo’s meta tags, like this: When upload to Nextgen gallery, I would like to have this caption to be added to the photo’s title and description. So I modified […]

Read the full article →

Mask Mobile Number Using C#

by Weijie JIN

A small piece of code which mask any string with specific mask characters. // Mask the mobile. // Usage: MaskMobile("13456789876", 3, "****") => "134****9876" public static string MaskMobile(string mobile, int startIndex, string mask) { if (string.IsNullOrEmpty(mobile)) return string.Empty; string result = mobile; int starLengh = mask.Length; if (mobile.Length >= startIndex) { result = mobile.Insert(startIndex, mask); […]

Read the full article →