VS2008, C++ Project, WinSxS requestedPrivileges error…

Got a task to write a native ActiveX control to run under IE7 for testing the security context when the ActiveX control creating another process to run a WinForm application.

It’s pretty easy to create an  ActiveX control using .NET, but this time I have to use native C++ code. been a long time not writing those stuffs, got a tough learning curve to get those thing back last week.

Am going to take the shortest path of using ATL to create ActiveX control under VS2008 C++ ATL Project. following the ATL Tutorial and it also pointed out another MFC example TstCon (ActiveX Control Test Container) for testing the control without using a browser. followed the instructions to build the TstCon example and when going to run it, got the following error:

The application had failed to start because uts side-by-side configuration is incorrect. Please see the application event log for more detail.

By looking to Application event log, got the error as following:

Activation context generation failed for "C:\path-to\TstCon32.exe".Error in manifest or policy file "C:\path-to\TCProps.DLL" on line 1. The requestedPrivileges element is not allowed in component manifest.

by searching the internet, found the info about this problem also got a solution for this. by turning off the UAC linker option (Enable User Account Control (UAC), the /MANIFESTUAC option) that’s defaultly Yes to No, and rebuild the application, the error is vanished the the TstCon application started.

Now I can continue testing my ActiveX control…


Comments (2)

  1. What if you had written an native ATL ActiveX control and just can not let it show on your IE7 browser?

  2. Bugo Hoss says:

    Man, thank you very much! I was about to hesitate.

Skip to main content