Project security. DLL conflicts with the project in the. NET Framework

Source: Internet
Author: User
Today, a simulated sending request in the project uses the httpwebrequest and httpwebresponse classes for sending. When the getresponse () method is used, Program An internal error "the basic connection has been closed: An error occurred while receiving" has been reported for a long time. The specific error is as follows: catched exception: [system. net. webexception]: "The basic connection has been closed: An error occurred while receiving. "In <system. Web. Services>
System. net. webexception: the basic connection has been closed: An error occurred while receiving. ---> System. entrypointnotfoundexception: the endpoint "enumeratesecuritypackagesw" cannot be found in the DLL "security. dll.
In system. net. unsafenclnativemethods. safenethandles_security.enumeratesecuritypackagesw (int32 & pkgnum, safefreecontextbuffer_security & handle)
In system. net. safefreecontextbuffer. enumeratepackages (securdll, int32 & pkgnum, safefreecontextbuffer & pkgarray)
In system. net. sspisecurechanneltype. enumeratesecuritypackages (int32 & pkgnum, safefreecontextbuffer & pkgarray)
In system. net. sspiwrapper. enumeratesecuritypackages (sspiinterface secmodule)
In system. net. sspiwrapper. getverifypackageinfo (sspiinterface secmodule, string packagename, Boolean throwifmissing)
In system. net. Security. securechannel .. ctor (string hostname, Boolean servermode, schprotocols protocolflags, x509certificate servercertificate, x509certificatecollection clientcertificates, Boolean success, Boolean checkcertname, Boolean success, localcertselectioncallback callback)
In system. net. Security. sslstate. validatecreatecontext (Boolean isserver, string targethost, sslprotocols success, x509certificate servercertificate, x509certificatecollection clientcertificates, Boolean success, Boolean checkcertrevocationstatus, Boolean checkcertname)
In system. net. tlsstream. processauthentication (lazyasyncresult result)
In system. net. tlsstream. Write (byte [] buffer, int32 offset, int32 size)
In system. net. pooledstream. Write (byte [] buffer, int32 offset, int32 size)
In system. net. connectstream. writeheaders (Boolean async)
--- End of the internal exception stack trace --- Solution Process: Environment: Windows2003, vs2008 search for all projects, find all generated "security. DLL "project, delete this DLL (if the project is generated, change the Assembly name of the project to security, so as not to conflict with Microsoft) after the above operations, the two classes mentioned above can be called normally, but the same problem still occurs, I checked the information on the Internet and discussed it with my colleagues. I found that Vs will "temporary asp" during compilation or debugging. add the corresponding DLL information to the. NET files file. DLL ", this dll must be deleted here, otherwise it does not work, so this" temporary security. DLL "must be deleted. Because vs2008 is used, the complete deletion address is c: \ windows \ Microsoft. net \ framework \ v2.0.50727 \ temporary ASP. net files, and then search for this DLL in this folder to delete it. At this point, "the basic connection has been closed: An error occurred while receiving" is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.