, Kev, , . WCF- - CommunicationObjectFaultedException, - VS2008 ( ?).
FileLoadException, System.ServiceModel:
- , GAC. ( HRESULT: 0x80131050) . 949080 .
, KB 949080 , SQL 2005 ( , SQL 2008 2005 - , ) .NET FX - .
32- 64- . SQL 2008 - x64 2008 x64 - , , C:\Windows\Microsoft.NET\Framework, Framework64. SQL Server - 64- , - Framework64 System.IdentityModel System.IdentityModel.Selectors Program Files, Program Files (x86).
, x86 - System.Web :
Assembly 'System.Web' assembly assembly 'system.web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a.', .
, ... , System.Web, , System.Web. , StackOverflow . , , Framework64 System.Web Framework .
, , WCF, CommunicationObjectFaultedException. WCF IDisposable, use Dispose, - - :
var p = new MyServiceClient(new CustomBinding(b), new EndpointAddress(uri));
var result = p.Execute();
try {
return result.Values;
} finally {
if (p.State != CommunicationState.Closed) {
if (p.State != CommunicationState.Faulted) {
p.Close();
} else {
p.Abort();
}
}
}
FileLoadException, System.Runtime.Serialization KB 949080.
, x64 , , Framework, , , Program Files (x86) System.IdentityModel.
- ... . IntPtr.Size 8 ... x64. x64 ( x86) - AnyCPU. x86 x64, , . CREATE ASSEMBLIES:
create assembly [System.Web]
from 'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\System.Web.dll'
with permission_set = UNSAFE
create assembly [System.Messaging]
from 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Messaging.dll'
with permission_set = UNSAFE
create assembly [SMDiagnostics]
from 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\SMDiagnostics.dll'
with permission_set = UNSAFE
CREATE ASSEMBLY [System.IdentityModel]
from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.IdentityModel.dll'
with permission_set = UNSAFE
CREATE ASSEMBLY [System.IdentityModel.Selectors]
from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\System.IdentityModel.Selectors.dll'
with permission_set = UNSAFE
CREATE ASSEMBLY [Microsoft.Transactions.Bridge]
from 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\Microsoft.Transactions.Bridge.dll'
with permission_set = UNSAFE
AnyCPU. YMMV x86- Sql Server.
. , . C.