本文介绍了Security.dll的问题与.NET项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经开始收到以下错误我们的一些支付应用:

We have started getting the following error on some of our payment applications:

这方法PurchasePermitObject意外的错误:MakePayment

Unexpected Error from method PurchasePermitObject: MakePayment

基础连接已关闭:发生在一个receive.Unable意外的错误,以找到名为EnumerateSecurityPackagesW在DLLSecurity.dll的'切入点

The underlying connection was closed: An unexpected error occurred on a receive.Unable to find an entry point named 'EnumerateSecurityPackagesW' in DLL 'security.dll'.

错误偶尔发生,无韵或理由。在研究这个问题,我发现有一个问题,使用名为Security.dll的DLL

The error happens sporadically with no rhyme or reason. On researching this issue I have discovered there is an issue with using a dll named security.dll

https://connect.microsoft.com/VisualStudio/feedback/details/104453/existence-of-a-dll-named-security-dll-in-bin-directory-causes-web-service-request-to-fail-with-401-access-denied

现在的应用程序使用一个安全的dll,但它是prefixed例如: ABCsecurity.dll,我还以为这将有pvented这个问题$ P $,因为它是由MS和其他博客等递上的解决方案。

Now the applications uses a security dll but it is prefixed e.g. ABCsecurity.dll and I would have thought this would have prevented this issue as it is the solution proffered by MS and other blogs etc.

任何想法,将appeciated,因为这是造成,是什么给它改名完全走在Security.dll的结束的可能性?

Any ideas would be appeciated as this is causing, is the possibility of renaming it completely away from anything ending in security.dll?

推荐答案

该错误消息说,这是用Security.dll的,所以它没有任何关系ABCsecurity.dll。搜索这台机器的硬盘驱动器名为Security.dll的

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"

这种问题很可能是由Windows引起搜索的DLL进程的当前工作目录,如果它不能找到包含EXE的目录中的DLL。这是一个安全隐患而微软也设计了一些反制措施反对。最相关的MSDN页面在这里。你不能做任何事情的调用LoadLibrary()调用,这里面烤的框架code。该清单是有点痛苦,最简单的一个是 SafeDllSearchMode 的注册表项。这可确保在C Security.dll的文件:\ Windows \ System32目录总是首先发现,随机副本的工作目录之前

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.

这篇关于Security.dll的问题与.NET项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 22:47