Problem using OpenThreadToken

R

Rashid

I have a COM DLL developed in VC++ where in certain place following statements are executed

hThread = GetCurrentThread()

If (OpenThreadToken(hThread, TANDARD_RIGHTS_REQUIRED |TOKEN_ASSIGN_PRIMARY|TOKEN_DUPLICATE | TOKEN_IMPERSONATE|TOKEN_QUERY_SOURCE|TOKEN_ADJUST_PRIVILEGES|TOKEN_ADJUST_GROUPS
TOKEN_ADJUST_DEFAULT| TOKEN_ADJUST_SESSIONID | TOKEN_QUERY, TRUE, &horigtoken) == 0
....

In ASP application I am using this COM dll and it is absolutely fine. But after I migrated from the ASP to ASP.Net, I noticed while debugging that call to OpenThreadToken is failing in ASP.Net

In both ASP and ASP.Net application, for IIS Directory Security Authentication Method I am using Anonymous access for a specific local user account created on the server

The error # I get while calling the COM method from ASP.Net is 1008 (An attempt was made to reference a token that does not exist

If anyone has come across such a situation, pls share your thoughts to make it work
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,798
Messages
2,569,651
Members
45,385
Latest member
ZapGuardianReviews
Top