February 6th, 2010, 08:57 PM
System.Security.Permissions : Problem with ActiveX in C#
Hi, friends. Before saying anything, I hope you forgive my English because I'm still learning and there will be a lot of grammatical mistakes in my words.
I'm trying to make an ActiveX component that allows to detect if there is an smartcard reader connected to my PC. The classes that help me to do that are in a dll and they work exactly the way they should. So, what my problem is?
In order to use that dll from the Internet Explorer, I made an UserControl, which contain a combobox and a button. When I embebe this user control in a Windows Form project in C# there is no problem, it works perfectly: I press the button and the list of readers conected appears on the combobox.
Nevertheless when I put this control in a webpage by using the OBJECT tag, the page loads correctly the user control but when I press the button, a messagebox is shown with the following: System.Security.Permissions.SecurityPermissions.
The problem may be caused because the code try to access to a native dll of Windows(windscard.dll), however I do not understand why the UserControl works in the Windows Form but not in the webpage.
What should I do?
Thank you in anyway
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!