Unable to find an entry point named EnumerateSecurityPackagesW in

Discussion in 'ASP .Net Web Services' started by TRI_CODER, Aug 17, 2005.

  1. TRI_CODER

    TRI_CODER Guest

    I am trying to solve the following exception. The exception occurs when my
    ASP.NET code behind code attemtps to access a remore site using SSL. Please
    note that all certificates are valid and the remote site is trusted. Also, my
    web site uses a custom HTTPModule implemented in a DLL named Security.dll.

    Unable to find an entry point named EnumerateSecurityPackagesW in DLL
    security.dll.

    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information about
    the error and where it originated in the code.

    Exception Details: System.EntryPointNotFoundException: Unable to find an
    entry point named EnumerateSecurityPackagesW in DLL security.dll.
     
    TRI_CODER, Aug 17, 2005
    #1
    1. Advertising

  2. TRI_CODER

    [MSFT] Guest

    Hello,

    The problem may be related to the name of "Security.dll". You can find a
    file with same name in "Windows\System32\" and it is actually part of
    Windows OS.

    When ASPNET loads your WebRequest code following happens:

    Frameworks at one point is doing DllImport inside HttpWebRequest, to call
    DllLoadLibrary on Security.dll. When no path is specified, the function
    searches for loaded modules whose base name matches the base name of the
    module to be
    loaded. If the name matches, the load succeeds.

    Otherwise, the function searches for the file in the following sequence:
    1. The directory from which the application loaded.
    2. The current directory.
    3. The system directory. Use the GetSystemDirectory function to get
    the path of this directory.
    4. The Windows directory. Use the GetWindowsDirectory function to
    get the path of this directory.
    5. The directories that are listed in the PATH environment
    variable.

    So if in certain situations your custom Security.dll is loaded before
    c:\winnt\system32\security.dll then LoadLibrary thinks it has the dll
    already loaded (since it's just a Win32 Dll, only name matter, NOT version
    information). But as we know this is not the correct dll and hence the
    problem.

    Hope this help

    Luke
     
    [MSFT], Aug 18, 2005
    #2
    1. Advertising

  3. TRI_CODER

    TRI_CODER Guest

    RE: Unable to find an entry point named EnumerateSecurityPackagesW

    Thanks for the response Luke,

    There is a DLL named Security.dll in the \bin folder of my application, is
    renaming the DLL the only way of fixing the problem I have encountered?

    __
    Julio

    "[MSFT]" wrote:

    > Hello,
    >
    > The problem may be related to the name of "Security.dll". You can find a
    > file with same name in "Windows\System32\" and it is actually part of
    > Windows OS.
    >
    > When ASPNET loads your WebRequest code following happens:
    >
    > Frameworks at one point is doing DllImport inside HttpWebRequest, to call
    > DllLoadLibrary on Security.dll. When no path is specified, the function
    > searches for loaded modules whose base name matches the base name of the
    > module to be
    > loaded. If the name matches, the load succeeds.
    >
    > Otherwise, the function searches for the file in the following sequence:
    > 1. The directory from which the application loaded.
    > 2. The current directory.
    > 3. The system directory. Use the GetSystemDirectory function to get
    > the path of this directory.
    > 4. The Windows directory. Use the GetWindowsDirectory function to
    > get the path of this directory.
    > 5. The directories that are listed in the PATH environment
    > variable.
    >
    > So if in certain situations your custom Security.dll is loaded before
    > c:\winnt\system32\security.dll then LoadLibrary thinks it has the dll
    > already loaded (since it's just a Win32 Dll, only name matter, NOT version
    > information). But as we know this is not the correct dll and hence the
    > problem.
    >
    > Hope this help
    >
    > Luke
    >
    >
    >
     
    TRI_CODER, Aug 18, 2005
    #3
  4. TRI_CODER

    [MSFT] Guest

    RE: Unable to find an entry point named EnumerateSecurityPackagesW

    It should be the only way to get around the problem.

    Luke
     
    [MSFT], Aug 19, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam Fields
    Replies:
    0
    Views:
    2,833
    Sam Fields
    Oct 22, 2004
  2. =?Utf-8?B?VFJJX0NPREVS?=
    Replies:
    1
    Views:
    3,436
    Steven Cheng[MSFT]
    Aug 18, 2005
  3. Sam Fields
    Replies:
    0
    Views:
    167
    Sam Fields
    Oct 22, 2004
  4. TRI_CODER
    Replies:
    1
    Views:
    217
    [MSFT]
    Aug 18, 2005
  5. Saraswati lakki
    Replies:
    0
    Views:
    1,370
    Saraswati lakki
    Jan 6, 2012
Loading...

Share This Page