I created one adobe plugins to work from Adobe Reader/Acrobat using Adobe Acrobat SDK and that was built on .net 3.5 version. On conversion of .net framework version from v3.5 to v4.5, we are now getting error while the Adobe Reader/Acrobat is starting and plugins are not working. While making the log we found following exception:
- System.IO.FileLoadException: Could not load file or assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
File name: 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at System.ServiceModel.Channels.Binding.set_ReceiveTimeout(TimeSpan value)
at MyClass.Connect()
=== Pre-bind state information ===
LOG: User = domainname\username
LOG: DisplayName = System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Adobe/Reader 11.0/Reader/
LOG: Initial PrivatePath = NULL
Calling assembly : System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31 bf3856ad364e35\System.ServiceModel.Internals.dll.
LOG: Assembly is loaded in default load context.
The C# code is written as follows:
EndpointAddress endpoint = newEndpointAddress("net.pipe://localhost/MyApp/");
NetNamedPipeBinding binding = newNetNamedPipeBinding(NetNamedPipeSecurityMode.None);
binding.ReceiveTimeout = TimeSpan.MaxValue;
IAcroServer cserver = ChannelFactory<IAcroServer>.CreateChannel(binding, endpoint);
Can anyone help me to find the reason and resolution of the problem I am facing...Thanks in advance.