Obsolete Entity Framework Configuration Section

Problem

When the code is initializing a DbContext, the following error occurs:

“The type initializer for ‘System.Data.Entity.Internal.AppConfig’ threw an exception”

Solution

Make sure the App.Config has the correct entity framework

    <section name=”entityFramework” type=”System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ requirePermission=”false” />   

In fact, you may not even need this configuration section at all.

Cause

In my case, I upgraded the project to use Entity Framework 5.0 but I did not change the App.Config.  So I had the following old entity framework setting in it:

<section name=”entityFramework” type=”System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″/>

Advertisements

Windows 8 App Certification

Regardless of whether you collect personal information in your app, you must have a privacy statement in your app description and the Windows Charm settings.

Otherwise, your app won’t get certified. Period.

P.S.  Even if you state explicitly that you do not collect user data in the description or write to the testers, they will still strictly enforce the requirement 4.1.

4.1 Your app must comply with the following privacy-related requirements:
4.1.1 Your app must have a privacy statement if it collects personal information

If your app collects or transmits any user’s personal information, including an IP address, you must maintain a privacy policy that complies with applicable laws and regulations, informs users of the information collected by your app and how that information is used, stored, secured and disclosed, and describes the controls that users have over the use and sharing of their information, and how they may access their information.

You must also provide access to your privacy policy in the Description page of your app, as well as in the app’s settings as displayed in the Windows Settings charm.”

Desk.com vs ZenDesk.com

Desk.com is best for 1 single support staff because it is free and have many features.

image

ZenDesk.com is good for 3 support staff because it is $20/year, but with many features limitation like attachment max size of 1MB. 

image

Once you have more than 3 full time support staff, then you need to compare carefully between the 2 based on the required support hours and features needed.

SQL: Find the Max value from a list of values

SQL MAX function will return the max value for a given column of a table.

What if you want to get the max value of multiple date fields for a given row?

The answer is to use virtual/derived table/column.

 

SELECT [col1, col2, etc]
(SELECT Max(vCol1)
FROM (VALUES (date1), (date2), (date3), ...) AS vTable(vCol1)) as [MaxDate],
FROM [mytable]

credit to Sven for the solution idea.

Windows Azure Fixed IP Address

Unlike Amazon, you cannot reserve or get a fixed static IP address for your virtual machine in Windows Azure.

“A virtual IP address is determined for you at deployment time and will remain fixed from that point on until the deployment is actually deleted. …  Because IP Addresses are allocated at deployment time, deleting the deployment would reallocate your previous address to the pool and the re-deployment would likely result in a new IP Address.”

reference

VS 2012 Project References with Yellow Triangles

Problem

If you have project references with yellow triangles, you should check your build output, look for warnings and read their descriptions.  Probably one would describe why the project reference is marked with a yellow triangle.

Cause

In my case, the cause was due to my new project targeting .Net framework 3.5 by default and the project being referenced was using 4.5.

Solution

So I corrected my project properties so that it targeted 4.5.