Using EF in SharePoint read this first

Entity Framework (EF) is one of the best framewok that i love , it makes data layer things quicker,safer and better for us. Well using Entity Framework inside of SharePoint (i mean in same worker process) ,if you not expert level experiance enough with EF and don’t know what you do ; using it in SharePoint is not a good idea , SharePoint itself is a huge web Application ever developed even you did not make any customization. Billons of code and hundreds of assemlies are behind in a simple SharePoint site   And any integration using EF ( except small implementations) If you make easily something wrong or not calculate the data grow you must highly face a performance issues. And trying to troubleshoot it inside the sharepoint it is not an easy task.

A highly utilized SharePoint site, has already consume many of your system Resources , even out side of the SharePoint , an ASP.Net Application using EF can easily comsumes your resouces .(Yeah it depends what you do) . both heavy Operations in same place is not a wise decision .

For SharePoint 2010 it is not posible. SharePoint 2010 based on the .NET FrameWork 3.5, which requries IIS to use the ASP.NET 2.0 Runtime. Entity Framework 4.1 or higher builds uses the .NET FrameWork 4.0, which requries IIS to use the ASP.NET 4.0 runtime. As a result you cannot run EF 4.1 or higher builds natively in SharePoint 2010.

For SharePoint 2013 use .NET framewok 4.0 , and there is no restriction to use EF inside SharePoint 2013 processes. But you really want to use it , i would suggest do it out side of the SharePoint . Create a WCF/Web service  and use your data logic , caching etc outside of the SharePoint and consume it from SharePoint side .It will provide you flexibility , compatibility ,stability and easy troubleshooting if you face any problem.

Well , Microsoft makes all investments on cloud Technologies and the SharePoint Online is our future , you could not use any Server OM tools with SharePoint Online , Unfortunately EF implementation inside SharePoint included , so if you have any kind of EF implementation inside SharePoint will not be supported for SPO if you have any plan for migration .


Sharepoint 2010 Redirect to Access Denied Page

Hi everyone ,

If your code need  to redirect access denied page in somewhere you can use SPUtility.HandleAccessDenied() function.

Here is an example:

SPUtility.HandleAccessDenied(new Exception(“You don’t have access rights to see this content”));

Happy tips.

Sharepoint 2010 and various Sql Server versions but which service pack ?

SharePoint 2010 is 64-bit only. It requires Windows Server 2008 SP2 or Windows Server 2008 R2. It will not run on a Server Core installation.It requires one of these versions of x64 SQL Server:

SQL Server 2005 Editions

SQL Server 2005 Enterprise Edition SP3 CU3 (Build 4220) or greater
SQL Server 2005 Standart Edition SP3 CU3 (Build 4220) or greater
SQL Server 2005 Express Edition

(Note: SQL Server 2005 goes out of mainstream support in April 2011)

SQL Server 2008 Editions
SQL Server 2008 Enterprise Edition SP1 CU2 (Build 2714) required , CU5 or later recommended (CU3 & CU4 not recommended)
SQL Server 2008 Standart Edition SP1 CU2 (Build 2714) required , CU5 or later recommended (CU3 & CU4 not recommended)
SQL Server 2008 Express Edition

SQL Server 2008 R2 Enterprise & Standart & Express editions.

How to check version of SQL Server

-- Method 1: Retrieve complete version info, parse results in C#
-- Method 2: Detecting the edition and version of SQL Server from T-SQL
IF SERVERPROPERTY('EngineEdition') = 3
        PRINT 'Enterprise Edition'
CONVERT(VARCHAR(3), SERVERPROPERTY('productversion')))) > 9
                PRINT 'SQL Server 2008 or greater';
                -- Do something like use data compression on an index
                PRINT 'SQL Server 2005 or lower';
                -- Do something like create an index in online mode
        PRINT 'Standard Edition';
        -- Create an index in offline mode

LangStore for Sharepoint 2010

Sharepoint developers knows LangStore for building Multilingual Sharepoint 2007 Sites  by Chris O’Brain. This is very useful tool and i personally thanks Chris for this great tool. But when you want to use this tool with sharepoint 2010 it has some compatiblity issues .
Some of Site columns collide with comming out of the box columns already used by site content type for example “catagory”. I download and change code with schema.xml and element.xml of MultilingualItemType like below:


<FieldRef Name=LinkTitle />

<FieldRef ID={E5C8FDA4-BDA7-4419-8A4E-DE102964884B}
Name=LangStoreCategory Required=true />

<FieldRef ID={D36535DC-31D1-4eb2-9C5C-58CE11EDA226}
Name=LangStoreDescription Required=false />

<FieldRef ID={160036D9-C1A0-419a-AFCE-4CF0525E2160}
Name=LS_LANG_EN Required=false />

<FieldRef ID={21C5A600-9BE5-4f2a-ABD8-271206FC988F}
Name=LS_LANG_TR Required=false />

<FieldRef ID={20DA8826-4CAC-41ca-9399-A82C50E9D66F}
Name=LS_LANG_EN-US Required=false />

<FieldRef ID={1DC99CF7-6667-44ee-83AB-0A5D46D0A092}
Name=LS_LANG_EN-GB Required=false />

<FieldRef ID={600081D6-5AA3-4901-AC55-5537C044D383}
Name=LS_LANG_FR-FR Required=false />

<FieldRef ID={E96813DE-E8A8-4640-AF8D-1E4AC4292B3E}
Name=LS_LANG_DE Required=false />



And i also change all project for suitible with Sharepoint 2010 project for VS 2010 IDE.



Original Langstore :   sharepoint-sites.html


Orginal Langstore Download:

You can download LangStore2010 from: