Re: Graphics.GetHdc causes InvalidOperationException

From: Nicole Calinoiu (calinoiu)
Date: 06/27/05


Date: Mon, 27 Jun 2005 09:07:38 -0400

I'm having no problems running a similar control from either the intranet or
internet zones using only the permissions granted under default CAS policy.
Might you be able to provide the exact code for your control?

"Richard Morris" <khiron@community.nospam> wrote in message
news:OPdB8d0dFHA.3808@TK2MSFTNGP14.phx.gbl...
>I have a trivial control descendant that simply handles it's onPaint event
>to paint itself with "Hello World". I have dropped that on an app and it
>runs as expected.
>
> Now if I embed that as an object on an HTML page, I get an error
> "System.InvalidOperationException: The object is currently in use
> elsewhere." caused by the Graphics.GetHdc() method.
>
> The error has something to do with security settings. Full Trust
> permissions are granted to the Microsoft assemblies and the test assembly
> by their strong keys. If .NET Security is off (caspol -s off) or if
> FullTrust is granted to All Code under the LocalIntranet_Zone, the page
> will open fine without errors. If the application
> (WindowsApplication2.exe) is opened from IIS with restricted security
> settings, it will work fine.
>
> In otherwords the problem seems to be specific to hosting a .NET control
> in Internet Explorer.
>
> Anyone have any clues as to how I can configure .NET security to enable
> this test application to be hosted in Internet Explorer.
>
> thanks in advance,
>
>
>
>
>
>
>
>



Relevant Pages

  • Re: Who Wants To Get Rid Of The Internet?
    ... rpg7, propellants, incendiaries, incendiary device, thermite, security ... JICS, Computer Terrorism, Firewalls, Secure Internet Connections, RSP, ISS, ... There are those in US government that desperately want to control ... relinquish control of the internet to a coalition of governments ...
    (misc.survivalism)
  • Re: some further comments...
    ... but the Internet is risky. ... They also want to reduce support costs. ... satisfy corporate customers. ... to gain some control over the Internet and profit from the ...
    (microsoft.public.scripting.vbscript)
  • Bush wants control of the internets!
    ... Bush wants control of the internets! ... Internet computers. ... Thursday's declaration means Commerce would keep that control [of ICANN], ... Bush administration annexes control of the Internet ...
    (sci.med.diseases.lyme)
  • Re: UN wants internet
    ... World Summit on the Information Society held in Tunis came to a close ... without control of the Internet being ceded to a collection of foreign ... Once again, if you're not a real government, the next best ...
    (alt.politics)
  • Re: Canon challenge.. any submissions from people here?
    ... identity and let it out to the wider internet community and then go on a ... "there is no way to control who distributes their information and on what ... distributor can compete with decentralized grassroots distribution via ... It's big corporations (like publishers) that realize they ...
    (rec.photo.digital)