Security.dll Issue with .NET project

柔情痞子 提交于 2019-12-06 02:06:58

The error message says it is using "security.dll" so it has nothing to do with "ABCsecurity.dll". Search the hard drive of that machine for files named "security.dll"

This kind of problem is likely to be caused by Windows searching the process' current working directory for DLLs if it cannot find the DLL in the directory that contains the EXE. It's been a security hazard and Microsoft has designed some counter-measures against it. The most relevant MSDN page is here. You cannot do anything about the LoadLibrary() call, that's baked inside the framework code. The manifest is a bit painful, the easiest one is the SafeDllSearchMode registry key. That ensures that the security.dll file in the c:\windows\system32 directory is always found first, before a random copy in the working directory.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!