Alexander Anikin's blog

My personal blog

Archive for the ‘Windows Server’ Category

Install bunch of DLL files to Windows Server 2012 GAC

leave a comment »

Thanks to http://devlicio.us/blogs/christopher_bennage/archive/2010/08/25/powershell-gac-and-build-servers.aspx

1. Create ps1 script with contents:

if ( $null -eq ([AppDomain]::CurrentDomain.GetAssemblies() |? { $_.FullName -eq “System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” }) ) {

[System.Reflection.Assembly]::Load(“System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”) | Out-Null
}

$publish = New-Object System.EnterpriseServices.Internal.Publish

Foreach ($file in Get-Childitem “*.dll” -recurse -force)
{
Write-Host $file

$assembly = $null

if ( $file -is [string] ) {
$assembly = $file
} elseif ( $file -is [System.IO.FileInfo] ) {
$assembly = $file.FullName
} elseif ( $file -is [System.IO.DirectoryInfo] ) {
Continue
} else {
#throw (“The object type ‘{0}’ is not supported.” -f $file.GetType().FullName)
}

if ( -not (Test-Path $assembly -type Leaf) ) {
throw “The assembly ‘$assembly’ does not exist.”
}

if ( [System.Reflection.Assembly]::LoadFile( $assembly ).GetName().GetPublicKey().Length -eq 0 ) {
throw “The assembly ‘$assembly’ must be strongly signed.”
}

Write-Output “Installing: $assembly”

$publish.GacInstall( $assembly )
}

2.  Place it to folder with DLLs and start.

PS You can use set-executionpolicy remotesigned to switch running scripts on.

Written by Alex Anikin

September 13, 2013 at 7:57 am

Posted in .Net, Windows Server

Error Accessing SharePoint Document Library from Microsoft Office Open or Save As Dialog

leave a comment »

We got this issue from Windows Server 2008 from Citrix users. They tried to open or save document directly to SharePoint, but a dialog couldn’t browse into needed folder. And this works fine from Windows Server 2003.

Our server was in Trusted Sites with automatic login. The main problem was in WebDav client – it don’t get and use any browser sertting (so do nothing with Trusted Sites and so…)

Resolution for Windows Server 2008:

1. Need to install Desktop Experience with WebDav client and reboot server. (There was issues with Citrix after installation – need more investigation about.)

2. At AppServer need to add multiple-string key AuthForwardServerList to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters] and add all SP host-headers (like https://*.your-sharepoint.company.com)

 

Written by Alex Anikin

February 13, 2012 at 2:05 pm