Re: Graphics.GetHdc causes InvalidOperationException
From: Nicole Calinoiu (calinoiu)
Date: 06/27/05
- Next message: Nicole Calinoiu: "Re: asp.net client idenification"
- Previous message: catweezle2010: "Re: asp.net client idenification"
- In reply to: Richard Morris: "Graphics.GetHdc causes InvalidOperationException"
- Next in thread: Richard Morris: "Re: Graphics.GetHdc causes InvalidOperationException"
- Reply: Richard Morris: "Re: Graphics.GetHdc causes InvalidOperationException"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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,
>
>
>
>
>
>
>
>
- Next message: Nicole Calinoiu: "Re: asp.net client idenification"
- Previous message: catweezle2010: "Re: asp.net client idenification"
- In reply to: Richard Morris: "Graphics.GetHdc causes InvalidOperationException"
- Next in thread: Richard Morris: "Re: Graphics.GetHdc causes InvalidOperationException"
- Reply: Richard Morris: "Re: Graphics.GetHdc causes InvalidOperationException"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|