Re: Security exception

From: Crirus (Crirus@datagroup.ro)
Date: 01/22/03


From: "Crirus" <Crirus@datagroup.ro>
Date: Wed, 22 Jan 2003 08:31:57 +0200


That's why I post here, because I have no ideea what is all this
PermisionsAttribute about

"Phil Wilson" <phil.wilson@unisys.spamcom> wrote in message
news:#HevykZwCHA.2516@TK2MSFTNGP09...
> The documentation implies that a .NET ActiveX control needs to set the
UnmanagedCode property:
> Quote:
>
> "Running an ActiveX control requires unmanaged code permission, which is
set with the
> SecurityPermissionAttribute.UnmanagedCode property. For more information
about security and
> unmanaged code permission, see SecurityPermissionAttribute class. "
>
> "Crirus" <Crirus@datagroup.ro> wrote in message
news:eCvnYkIwCHA.1636@TK2MSFTNGP12...
> > Hello again.
> >
> > Noone have some suggestions on this topic, please...?
> >
> > How can I use some pictures in an assemly inder IE.
> > I have a userControl embeded in html page and I wand to use some
pictures to
> > be draw in it.
> >
> > Crirus
> >
> >
> > "Crirus" <Crirus@datagroup.ro> wrote in message
> > news:#63VLXUvCHA.1656@TK2MSFTNGP09...
> > > I isolated somehow the code that generate the error:
> > >
> > > ' Dim bitmapID As Bitmap
> > >
> > > ' Dim resourceManager = New resourceManager("Crirus.Gamer.terrain",
> > > Me.GetType.Assembly)
> > >
> > > There is another way on use resources, instead embedding it in
assambly? I
> > > use the assambly under IE from a server, just like an applet!
> > >
> > > Crirus
> > >
> > >
> > > "Crirus" <Crirus@datagroup.ro> wrote in message
> > > news:OBIRwUTvCHA.1776@TK2MSFTNGP09...
> > > > ok!
> > > > This is the behaviour:
> > > > I browse with IE a server. I got the page from the server with my
> > control
> > > > embeded.
> > > > When is initialised, I got that security exception:
> > > >
> > > > If my NET Framework trust zone is set to full trust for my site
address,
> > > > this error is not raised:
> > > > I can push Continue butto, but it's anoing because I really dont
need
> > > right
> > > > on client mashine, just an applet behaviour is what I need
> > > >
> > > >
> > > >
> > > > See the end of this message for details on invoking
> > > > just-in-time (JIT) debugging instead of this dialog box.
> > > >
> > > > ************** Exception Text **************
> > > > System.Security.SecurityException: Request for the permission of
type
> > > > System.Security.Permissions.ReflectionPermission, mscorlib,
> > > > Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
> > > failed.
> > > > at
System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
> > > > grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
> > > > PermissionToken permToken)
> > > > at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
> > > > BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo
> > > > culture, Boolean isBinderDefault, Assembly caller, Boolean
verifyAccess)
> > > > at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
> > > > BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo
> > > > culture, Boolean verifyAccess)
> > > > at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
> > BindingFlags
> > > > invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
> > > > at
> > Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
> > > > name, BindingFlags invokeAttr, Type objType, Object target, Object[]
> > args,
> > > > ParameterModifier[] modifiers, CultureInfo culture, String[]
> > > > namedParameters)
> > > > at
Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object
> > o,
> > > > Type objType, String name, Object[] args, String[] paramnames,
Boolean[]
> > > > CopyBack)
> > > > at Crirus.Gamer.Assault.getPicture(String ImgResName)
> > > > at Crirus.Gamer.Assault.Initialize()
> > > > at Crirus.Gamer.Assault.HexMap_Load(Object sender, EventArgs e)
> > > > at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
> > > > at System.Windows.Forms.UserControl.OnCreateControl()
> > > > at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
> > > > at System.Windows.Forms.Control.CreateControl()
> > > > at System.Windows.Forms.Control.WmShowWindow(Message& m)
> > > > at System.Windows.Forms.Control.WndProc(Message& m)
> > > > at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> > > > at System.Windows.Forms.ContainerControl.WndProc(Message& m)
> > > > at System.Windows.Forms.UserControl.WndProc(Message& m)
> > > > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> > > > at
> > > >
> > >
> >
System.Windows.Forms.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessag
> > > > e(Message& m)
> > > > at
> > > >
> > >
> >
System.Windows.Forms.ActiveXImpl.System.Windows.Forms.IWindowTarget.OnMessag
> > > > e(Message& m)
> > > > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> > > > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg,
> > > > IntPtr wparam, IntPtr lparam)
> > > >
> > > >
> > > > ************** Loaded Assemblies **************
> > > > mscorlib
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.288
> > > > CodeBase:
> > > > file:///c:/windows/microsoft.net/framework/v1.0.3705/mscorlib.dll
> > > > ----------------------------------------
> > > > System
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.288
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/system/1.0.3300.0__b77a5c561934e089/system.d
> > > > ll
> > > > ----------------------------------------
> > > > System.Drawing
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.288
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/system.drawing/1.0.3300.0__b03f5f7f11d50a3a/
> > > > system.drawing.dll
> > > > ----------------------------------------
> > > > RegexAssembly82_0
> > > > Assembly Version: 0.0.0.0
> > > > Win32 Version: n/a
> > > > CodeBase:
> > > > ----------------------------------------
> > > > Assault
> > > > Assembly Version: 1.0.0.0
> > > > Win32 Version: n/a
> > > > CodeBase: http://assault/Assault.DLL
> > > > ----------------------------------------
> > > > System.Windows.Forms
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.288
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/system.windows.forms/1.0.3300.0__b77a5c56193
> > > > 4e089/system.windows.forms.dll
> > > > ----------------------------------------
> > > > Microsoft.VisualBasic
> > > > Assembly Version: 7.0.3300.0
> > > > Win32 Version: 7.00.9502
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.3300.0__b03f5f7f11
> > > > d50a3a/microsoft.visualbasic.dll
> > > > ----------------------------------------
> > > > System.Xml
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.288
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/system.xml/1.0.3300.0__b77a5c561934e089/syst
> > > > em.xml.dll
> > > > ----------------------------------------
> > > > Accessibility
> > > > Assembly Version: 1.0.3300.0
> > > > Win32 Version: 1.0.3705.0
> > > > CodeBase:
> > > >
> > >
> >
file:///c:/windows/assembly/gac/accessibility/1.0.3300.0__b03f5f7f11d50a3a/a
> > > > ccessibility.dll
> > > > ----------------------------------------
> > > >
> > > > ************** JIT Debugging **************
> > > > To enable just in time (JIT) debugging, the config file for this
> > > > application or machine (machine.config) must have the
> > > > jitDebugging value set in the system.windows.forms section.
> > > > The application must also be compiled with debugging
> > > > enabled.
> > > >
> > > > For example:
> > > >
> > > > <configuration>
> > > > <system.windows.forms jitDebugging="true" />
> > > > </configuration>
> > > >
> > > > When JIT debugging is enabled, any unhandled exception
> > > > will be sent to the JIT debugger registered on the machine
> > > > rather than being handled by this dialog.
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>