Hi all,
I've got this problem.
I've to implemente a solution like the example in
http://support.microsoft.com/default...b;EN-US;313891, but I
can't configure correctly the example.
Every time I click on the textBox a System.Security .SecurityExcept ion
is raised.
At the end of MSDN article it's reported that I've to use .NET
Framework Configuration tool to grant the assembly the individual
permissione that are required, but I don't know how I can do it.
I've also tried to disabled policy checking with command caspol -s off
but I've always the same problem
Any ideas ?
The complete stacktrace of my System.Security .SecurityExcept ion is the
following:
-----------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Security .SecurityExcept ion: Request for the permission of type
'System.Securit y.Permissions.S ecurityPermissi on, mscorlib,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9'
failed.
at ActiveXSourcing .ControlEvents. ClickEvent(Int3 2 x, Int32 y)
at ActiveXSourcing .MyWindowContro l.ClickHandler( Object sender,
EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.TextBoxBa se.OnMouseUp(Mo useEventArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.TextBoxBa se.WndProc(Mess age& m)
at System.Windows. Forms.TextBox.W ndProc(Message& m)
at
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security .Permissions.Se curityPermissio n
The Zone of the assembly that failed was:
Intranet
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c 561934e089/Syste*m.dll
----------------------------------------
TestDll
Assembly Version: 1.0.2389.34599
Win32 Version: n/a
CodeBase: http://localhost/TestDll/TestDll.DLL
----------------------------------------
System.Windows. Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows. Forms/2.0.0.0__b77a5c 56*1934e089/System.Windows. Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f 7f11d50a*3a/System.Drawing. dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f 7f11d50a3*a/Accessibility.d ll
----------------------------------------
Microsoft.mshtm l
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase:
file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtm l/7.0.3300.0__b03 f5f7f11d50a*3a/Microsoft.mshtm l.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (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:
<configuratio n>
<system.windows .forms jitDebugging="t rue" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box