Getting NTLM security token from IE
I have an ActiveX that deploys some application on the client machine and starts it. When using NTLM on the IIS, the authentication wi开发者_Go百科th the web server done by IE and there is no problem to download files (I'm using URL Monikers API) but when an ActiveX starts the application (application also needs an access to the server) there is a need to do the authentication again.
I'm asking if there is a way to avoid second time authentication.
Thanks, Zaky
Both WinINET and URLMon maintain per-process caches of credential information; this information is not available to other processes. In order to provide the credentials to the other process, you would have to transfer them from the current IE process to the other process. Unfortunately, there are no supported APIs for that task.
Typically, however, environments that use NTLM/Negotiate tend to use the user's default credentials, which the URLMon APIs should be able to use if the appropriate flags are set.
精彩评论