SharePoint 2013 Kurulum Hatası

Merhaba Arkadaşlar,
Bu makalemizde sizlere SharePoint 2013 kurulumu sırasında alınan

Setup is unable to proceed due to the following error(s): This product requires Microsoft .Net Framework 4.5

hatanın sebebi ve çözümünden bahsedeceğim.

Bu hatanın sebebi arkadaşlar; SharePoint kurulumu için .Net Framework 4.5 gerekmektedir. Ama sisteminizde .Net 4.5 kurulu olduğuna rağmen bu hatayı alabilirsiniz. Çünkü SharePoint 2013 kurulumu öncesi Windows Server’ınızın updatelerini yaptığınız sırada Windows Update sisteminize .Net 4.6 kuruyor. Bu sebeple ki SharePoint kurulumu sisteminizde .Net 4.5 yok zannediyor.
Bu sorunu düzeltmek için İsterseniz aşağıdaki scripti çalıştırabilir veya manuel olarak registry üzerinde ilgili kaydı düzeltebilirsiniz.
Sisteminizde .Net Framework’un hangi versiyonunun kurulu olduğunu öğrenmek için aşağıdaki PowerShell komutunu çalıştırabilirsiniz.

Set-Location 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client' Get-ItemProperty -Path . | Select-Object Version

 
Veya Regedit’ten HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client kısmından Version anahtarının değerine bakabilirsiniz.
Bu değerlerin SharePoint 2013 kurulumu için “4.5.5150” olması gerekmektedir. Değiştirmeniz gereken yerler:

  • HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client\1033
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
  • SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1033

Burada yer alan “4.6.00079” değerini “4.5.5150” değeri ile değiştirmeniz gerekmektedir.
Eğer bu işlemi PowerShell ile yapmak isterseniz aşağıdaki kodu kullanabilirsiniz.

#######################
# Need PowerShell 5.0 https://www.microsoft.com/en-us/download/details.aspx?id=48729
#Enable-Privilege function found from Technet Article here (http://bit.ly/1VVOSAm)
Function Enable-Privilege {
Param(
$Privilege,
$ProcessId = $pid,
[Switch] $Disable
)
$Definition = @"
using System;
using System.Runtime.InteropServices;
public class AdjPriv {
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall,
ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr relen);
[DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);
[DllImport("advapi32.dll", SetLastError = true)]
internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);
[StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid {
public int Count;
public long Luid;
public int Attr;
}
internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
internal const int SE_PRIVILEGE_DISABLED = 0x00000000;
internal const int TOKEN_QUERY = 0x00000008;
internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
public static bool EnablePrivilege(long processHandle, string privilege, bool disable) {
bool retVal;
TokPriv1Luid tp;
IntPtr hproc = new IntPtr(processHandle);
IntPtr htok = IntPtr.Zero;
retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
tp.Count = 1;
tp.Luid = 0;
if(disable) {
tp.Attr = SE_PRIVILEGE_DISABLED;
}
else {
tp.Attr = SE_PRIVILEGE_ENABLED;
}
retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
return retVal;
}
}
"@
$ProcessHandle = (Get-Process -id $ProcessId).Handle
$Type = Add-Type $Definition -PassThru
$Type[0]::EnablePrivilege($ProcessHandle, $Privilege, $Disable)
}
$Items = "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client",
"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client\1033",
"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full",
"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\1033"
$CurrentUser = [System.Security.Principal.NTAccount]"$env:USERDOMAIN\$env:USERNAME"
$Items | ForEach-Object {
$Item = $_
$Path = "HKLM:\$Item"
Enable-Privilege SeTakeOwnershipPrivilege
$Key = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($Item,
[Microsoft.Win32.RegistryKeyPermissionCheck]::ReadWriteSubTree,
[System.Security.AccessControl.RegistryRights]::TakeOwnership
)
$ExistingACL = $Key.GetAccessControl()
$ACL = $Key.GetAccessControl([System.Security.AccessControl.AccessControlSections]::None)
$ACL.SetOwner($CurrentUser)
$Key.SetAccessControl($ACL)
$ACL = $Key.GetAccessControl()
$Rule = New-Object System.Security.AccessControl.RegistryAccessRule ($CurrentUser,"FullControl","Allow")
$ACL.SetAccessRule($Rule)
$Key.SetAccessControl($ACL)
Try {
$Value = Get-ItemPropertyValue -Path $Path -Name "RealVersion"
Set-ItemProperty -Path $Path -Name "Version" -Value $Value.Trim()
Remove-ItemProperty -Path $Path -Name "RealVersion"
} Catch [System.Management.Automation.PSArgumentException] {
$Value = Get-ItemPropertyValue -Path $Path -Name "Version"
New-ItemProperty -Path $Path -Name "RealVersion" -Value $Value
Set-ItemProperty -Path $Path -Name "Version" -Value "4.5.5150"
}
$Key.SetAccessControl($ExistingACL)
}
Hasan KÖROĞLU

Recent Posts

SharePoint TechNet/MSDN Forumları emekliye ayrılıyor

Microsoft SharePoint Technet ve MSDN forumları yerini Microsoft Q&A tartışma panolarına yerini bırakıyor. 10 Ağustos…

4 sene ago

Lokalde React ile uzak SharePoint ortamında Rest API ile çalışmak

Biliyorum, başlık çok garip, ilk bakışta anlaşılması zor. Ama şöyle tarif etmeye çalışayım. Bildiğiniz üzere…

4 sene ago

TypeScript Geliştirme Ortamı Hazırlama

Merhaba Arkadaşlar, Bu yazımızda sizlere TypeScript geliştirme ortamının (TypeScript Development Environment) nasıl hazırlanacağından bahsedeceğim. Öncelikle…

5 sene ago

TypeScript ile SystemJS kullanma

Merhabalar, bu yazımızda sizlere bir TypeScript projesinde farklı ts dosyaları içerisindeki function, class veya interface'lerin,…

5 sene ago

TypeScript – Giriş

Merhaba arkadaşlar, Yakın zamanda TypeScript öğrenmeye başladım. Hem öğrendiklerimi pekiştirmek hem de sizlerle paylaşmak adına…

5 sene ago

SharePoint için Responsive UI

Merhaba Arkadaşlar, Bu yazımızda sizlere mevcut SharePoint portalimizin, tablet, cep telefonu gibi farklı çözünürlükteki cihazlarda…

5 sene ago