I have created a WCF project where i have referenced the NCryptoki and NCryptokiMngd but when running the service on initialization the cryptoki object it is showing
"Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information."
I have added the below information to the App.Config:
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> <requiredRuntime version="v4.0.20506"/> </startup> <runtime> <generatePublisherEvidence enabled="false" /> </runtime>
but unfortunately no solution.
I have also checked that i am using the right .dlls compatible with my OS 32 bits.
Thanks in advance for your help!
Are you sure that the app config file is loaded by your service?
I cannot find any other stuff that can cause such a problem.
Ok thank u problem has been resolved.
I have included the below information in the client and host configuration file :
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> <requiredRuntime version="v4.0.20506"/> </startup>
<runtime> <generatePublisherEvidence enabled="false" /> </runtime>