Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

System.Security.Permissions : Problem with ActiveX in C#

combobox

  • Please log in to reply
No replies to this topic

#1 kevin7rm

kevin7rm

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 05 February 2010 - 10:08 PM

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
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download