Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 15005

What is reason for Exception: value cannot be null. Parameter name: serverSettingsValue for exchange 2010 powershell command

$
0
0

I am trying to execute powershell command

 Get-Mailbox

from C# code.

 When my C# project is complied in .NET 3.5 then no exceptions are thrown

But when same project is compiled in .NET 4.0 this error message getting thrown.

       


 This C# application  is executed on exchange server itself not from remote machine. Exchange server has all .NET version installed from 1.1 to 4.0.
I thought i have to add app.config file so i have updated project config file with these 2 lines 

<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0"/></startup>


But no luck. 
Any one know why .NET 4.0 is causing problem  for Exchange 2010 cmdlets ?
.Net 4.0 is installed after installing Exchange.

From Exchange Management shell I am able to execute this command but not from C# app.
Exchange 2010 has SP3 installed.

Viewing all articles
Browse latest Browse all 15005

Trending Articles