Kaspersky Blocks Network Printing

When I tried to print to a network printer, the anti-virus firewall software would block it automatically.  The printer queue will shows the document failed to print.

To test, I temporarily disabled Kaspersky and I could print fine.

It turned out the cause had to do with my network being “public network”.  Once I change it to “local network”, then I could print fine even with Kaspersky running.


Entity Framework Code First “Unable to generate an explicit migration because the following explicit migrations are pending”

I ran into this error “Unable to generate an explicit migration because the following explicit migrations are pending”.

Common causes include:

  1. You really have some pending migrations.  You can do “update-database –verbose” to apply the pending migrations.
  2. Your solution have multiple projects (e.g. WebAppProject, DataModelProject) and the wrong project is set as the start up project.  So just go to Visual Studio and select the right project and then set it as a startup project.
  3. You changed the ContextKey value in the Migrations\Configuration.cs.  You can always check the [dbo].[__MigrationHistory] entries to see if the ContextKeys match.  If Configuration.cs does not have a ContextKey, that should be fine.

Taskbar Overlapping Maximized Windows


On my Windows 8.1, the taskbar works normal on the desktop.  However, I have 2 extended desktop on 2 monitors. 


On these extended desktops, any maximized windows would either cover the taskbar or covered by the taskbar. For example, the taskbar covers/overlaps the bottom of my maximized Excel, I cannot click on the bottom worksheet tabs easily.


  1. Right click on the taskbar, select Properties
  2. Check Auto-hide the taskbar.  Click OK.
  3. Move your mouse to the bottom of the screen so it brings up the taskbar.
  4. Right click on the taskbar, select Properties
  5. Clear the checkbox Auto-hide the taskbar.  Click OK.
  6. Any maximized windows and the taskbar should no longer overlap/cover each other.


SSIS DTS Package Flatfiles with _x003C_none_x003E_

If you see “_x003C_none_x003E_” in the output file (probably a CSV), it is because the value of the text qualifier is set to “_x003C_none_x003E_”.  It is a bug.

You can fix it by opening the package with notepad and remove “_x003C_none_x003E_” from TextQualifier.

Change from

<DTS:Property DTS:Name=”TextQualifier”>_x003C_none_x003E_</DTS:Property>


<DTS:Property DTS:Name=”TextQualifier”></DTS:Property>

You can verify by checking it with Visual Studio:


Selenium Firefox Download PDF


Download online PDF file using Firefox. 


By default, Firefox will open the online PDF in the built-in PDF viewer.


The following C# code will create a new Firefox profile and use it with selenium.

   1: FirefoxProfile profile = new FirefoxProfile();


   3: // custom folder 

   4: profile.SetPreference("browser.download.folderList", 2); 


   6: // download folder location

   7: profile.SetPreference("browser.download.dir", "C:\\XXXX");


   9: // for PDF, save to disk without asking

  10: profile.SetPreference("browser.helperApps.neverAsk.saveToDisk", "application/pdf");


  12: // disable Firefox's built-in PDF viewer 

  13: profile.SetPreference("pdfjs.disabled", true); // disable Firefox's built-in PDF viewer 


  15: var browserDriver = new FirefoxDriver(profile);


  17: // save an online PDF 

  18: browserDriver.Navigate().GoToUrl(http://static.mozilla.com/moco/en-US/pdf/mozilla_privacypolicy.pdf);

Useful tip:

You can type “about:config” in Firefox browser address and create/search/view all these preference settings.

Other Approaches:

You can manually configure via Firefox’s Option –> Application.  Then you locate and load the profile from local disk..



Gmail IMAP Authentication Error Web Login Required

Gmail wants to promote the use of OAuth2 over simple username/password authentication.

If you use the password authentication, you may get an error saying “Web Login Required”.

If you don’t want to switch to OAuth2, then you need to go to your Google account’s setting (not Gmail setting).  Under “Sign-In & security”, look for “Allow less secure apps” and turn it to “ON”.