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#
SELECT @@VERSION AS [SQLVersionInfo];
-- Method 2: Detecting the edition and version of SQL Server from T-SQL
IF SERVERPROPERTY('EngineEdition') = 3
    BEGIN
        PRINT 'Enterprise Edition'
        IF CONVERT(INT, CONVERT(FLOAT,
CONVERT(VARCHAR(3), SERVERPROPERTY('productversion')))) > 9
            BEGIN
                PRINT 'SQL Server 2008 or greater';
                -- Do something like use data compression on an index
            END
        ELSE
            BEGIN
                PRINT 'SQL Server 2005 or lower';
                -- Do something like create an index in online mode
            END
    END
ELSE
    BEGIN
        PRINT 'Standard Edition';
        -- Create an index in offline mode
    END

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:

<FieldRefs>

<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 />

</FieldRefs>

.

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

 

 

Original Langstore :

http://www.sharepointnutsandbolts.com/2008/12/building-multi-lingual-   sharepoint-sites.html

 

Orginal Langstore Download:

http://splanguagestore.codeplex.com/

You can download LangStore2010 from:

http://rapidshare.com/files/425395340/LangStore2010.rar

Illegal characters in path when deploying to sharepoint 2010

This strange error occurs when deploying our sharepoint project to sharepoint 2010.This error caused by a character set problem on path of users folder.

My path contains a turkish character of “ı” .

Solution.

First:

Change your tmp path from
c:\Documents and settings\[My illegal charecters in here]\Local settings\Temp
to:
c:\temp folder

You can change temp folders by right click my computer -> properties -> advanced system settings -> Envoriments Variables

Second:

VisualStudio2010 -> tools -> options -> Projects & Solutions
change that paths to another path that not include your user account name which is contain
s illegal characters.

Happy programming…

Follow

Get every new post delivered to your Inbox.

Join 28 other followers