我现在写了一个 扩展DLL 是验证的,注册表设好键值ExtensionDLLs,然后连接时,sever2003 Internet验证服务 就会自动关闭,然后客户端显示'身份验证服务器未及时响应身份验证请求'信息(未设置 ExtensionDLLs时,可正常连接/断开)我就导出了一个函数RadiusExtensionProcess直接将第二个参数__out  PRADIUS_ACTION pfAction设为raAccept然后返回值为No_error。
然后我又改成导出3个函数:1、RadiusExtensionInit直接返回No_error,2、RadiusExtensionProcess未改动,3、RadiusExtensionTerm为空。结果还是一样。
然后又将PRADIUS_ACTION pfAction设为raContinue,注册表再加上AuthorizationDLLs,两个扩展DLL用的是同一个dll;我的预想是设为raContinue后 应该 验证和授权 都又变成NPS自己来做了,跟未设扩展DLL没什么差别,但是不知道扩展DLL里的问题何在(我是直接PRADIUS_ACTION pfAction设为raAccept然后返回值为No_error)。结果还是一样(sever2003 Internet验证服务 自动关闭,客户端显示'身份验证服务器未及时响应身份验证请求'信息)请教,谢谢。

解决方案 »

  1.   

    发现事情有点不对了:
    注册表中ExtensionDLLs、AuthorizationDLLs值设成我写的DLL时(例如'c:\DLL1.dll'),Internet验证服务打开后一会就自动关闭了(之前 以为是我连接时,Internet验证服会自动关闭),我都没做连接的动作。----->感觉是不是 根本 就没启动成功?
    注册表中ExtensionDLLs、AuthorizationDLLs值设成 空 时,是正常运行 可以连接,可以断开。我想了下:就算DLL导出函数写的不对也不能 Internet验证服务 一开就自动关啊。
    我DLL所在位置是:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AuthSrv\Parameters\下ExtensionDLLs、AuthorizationDLLs类型为REG_MULTI_SZ。DLL指导出RadiusExtensionProcess和导出RadiusExtensionInit+RadiusExtensionProcess+RadiusExtensionTerm结果一样求助啊求助
      

  2.   

    可以在你写的DLL的DllMain里面当PROCESS_ATTACH的时候就打印一下,看是不是加载了DLL..如果没有,那就是没有加载
      

  3.   

    用 regmon 看了 ias 确实有去HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AuthSrv\Parameters找ExtensionDLLs但是相关 dll 貌似没加载,服务也貌似未启动成功
      

  4.   

    在 ias close--->open 时:
    IASSAM.LOG文件:
    [2640] 01-15 13:03:50:812: Setting LM Authentication allowed to FALSE.
    [2640] 01-15 13:03:50:812: Initializing LSA/SAM sub-system.
    [2640] 01-15 13:03:50:812: Local server: \\W2003R2X64-2
    [2640] 01-15 13:03:50:812: Local account domain: W2003R2X64-2
    [2640] 01-15 13:03:50:812: Product Type: Server
    [2640] 01-15 13:03:50:812: Registry override: 
    [2640] 01-15 13:03:50:828: Role: Standalone
    [2640] 01-15 13:03:50:828: Primary domain: 
    [2640] 01-15 13:03:50:828: Default domain: W2003R2X64-2
    [2640] 01-15 13:03:50:828: Using cached SAM connection to local account domain.
    [2640] 01-15 13:03:50:828: Guest account: W2003R2X64-2\Guest
    [2640] 01-15 13:03:50:828: The registry value Enable NTLMv2 Compatibility does not exist. Using default 0
    [2640] 01-15 13:03:50:828: LSA/SAM sub-system initialized successfully.
    [2640] 01-15 13:03:50:859: Cannot read reg value EnableWPSCompatibility, error 2
    [2640] 01-15 13:03:50:875: The registry value User Identity Attribute does not exist. Using default 1
    [2640] 01-15 13:03:50:875: The registry value Override User-Name does not exist. Using default 0
    [2640] 01-15 13:03:50:875: User identity attribute: 1
    [2640] 01-15 13:03:50:875: Override User-Name: FALSE
    [2640] 01-15 13:03:50:875: Default user identity: <Guest>
    [2640] 01-15 13:03:50:875: Loading ExtensionDLLs
    [2640] 01-15 13:03:50:875: Loading extension C:\NotSystemFiles\dll1.dll
    [2640] 01-15 13:03:50:875: LoadLibraryW failed: 
    IASSDO文件:
    [2640] 01-15 13:03:49:875: IAS Core Manager is attaching to the local machine...
    [2640] 01-15 13:03:49:875: Machine SDO is attempting to attach to the local computer...
    [2640] 01-15 13:03:49:875: Machine SDO is initializing the IAS support services...
    [2640] 01-15 13:03:49:875: INFO CDsConnection::SetServerName ServerName = (null) 
    m_szServerName = W2003R2X64-2 IsRemoteServer 0 Success = 1[2640] 01-15 13:03:49:875: Machine SDO is creating the SDO schema...
    [2640] 01-15 13:03:49:875: Machine SDO has successfully attached to computer: 'W2003R2X64-2'...
    [2640] 01-15 13:03:49:890: Machine SDO is attempting to retrieve the Service SDO for service: IAS...
    [2640] 01-15 13:03:49:890: INFO CDsConnectionIAS::SetConfigPath. m_szConfigPath= C:\WINDOWS\SysWOW64\IAS[2640] 01-15 13:03:50:515: IAS Core Manager is initializing the auditors...
    [2640] 01-15 13:03:50:562: Machine SDO is retrieving the Dictionary SDO...
    [2640] 01-15 13:03:50:640: Machine SDO is retrieving the Dictionary SDO...
    [2640] 01-15 13:03:50:796: Machine SDO is retrieving the Dictionary SDO...
    [2640] 01-15 13:03:50:796: PipelineMgr::Initialize: progID = IAS.PolicyEnforcer
    [2640] 01-15 13:03:50:796: componentID = 7
    [2640] 01-15 13:03:50:812: PipelineMgr::Initialize: progID = IAS.NTSamAuthentication
    [2640] 01-15 13:03:50:812: componentID = 1
    [2640] 01-15 13:03:50:828: PipelineMgr::Initialize: progID = IAS.Accounting
    [2640] 01-15 13:03:50:828: componentID = 9
    [2640] 01-15 13:03:50:843: PipelineMgr::Initialize: progID = IAS.ProxyPolicyEnforcer
    [2640] 01-15 13:03:50:843: componentID = 5
    [2640] 01-15 13:03:50:843: PipelineMgr::Initialize: progID = IAS.RadiusProxy
    [2640] 01-15 13:03:50:843: componentID = 8
    [2640] 01-15 13:03:50:859: PipelineMgr::Initialize: progID = IAS.DatabaseAccounting
    [2640] 01-15 13:03:50:859: componentID = 13
    [2640] 01-15 13:03:50:875: IAS Core Manager is shutting down the auditors...
    明明有loading,为何会LoadLibraryW failed:?? 不知是那边错了啊
      

  5.   


    我看网上的资料上 这一句 后面都有报错信息的,我的后面什么报错信息都没。
    这个dll自己编个代码用LoadLibraryW是成功的啊,调用函数也是可以的啊。
    压栈方式也试过:cdecl和stdcall。到底是为什么啊......
      

  6.   

    发现 问题 所在了:我是32位编的dll,放到64位上面去跑了,哎...上面两位帅哥 分数平分吧。