473,382 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

a System.Security.SecurityExcept*ion trying to consume .net event in JScript code

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.SecurityException
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.SecurityException 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.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.
at ActiveXSourcing.ControlEvents.ClickEvent(Int32 x, Int32 y)
at ActiveXSourcing.MyWindowControl.ClickHandler(Objec t sender,
EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.TextBoxBase.OnMouseUp(MouseEv entArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message&

m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr 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.SecurityPermission
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__b77a5c561934e089/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__b77a5c56*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__b03f5f7f11d50a*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__b03f5f7f11d50a3*a/Accessibility.dll

----------------------------------------
Microsoft.mshtml
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
CodeBase:
file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a*3a/Microsoft.mshtml.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:
<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 computer
rather than be handled by this dialog box

Jul 19 '06 #1
0 796

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Htat | last post by:
When I write a program for event Log to check how many pages printed in my organization, I check print Event in System Event. My program works fine but when someone prints 2 or more copies in...
0
by: Lambuz | last post by:
Hi all, I've got this problem. I've to implemente a solution like the example in http://support.microsoft.com/default.aspx?scid=kb;EN-US;313891, but I can't configure correctly the example. ...
1
by: josh | last post by:
Hi, I have several independent, system components that write audit events to a database locally via ODBC and remotely via TCP, and I have a requirement to audit when the database is available for...
1
by: foekall | last post by:
Dear all...... I want to write security code with PHP plz help me........
5
by: eitangabay | last post by:
Hi all . I want to know when new process has added\loaded, i looked for system event but i could not find any. Is there any way to do it ? I'm writing in c#.NET. (Process Added meand that...
8
by: =?Utf-8?B?U3RldmVU?= | last post by:
Under Vista, my program, when reading the system event log, will not show the message saying I don't have the right permission. All I wisht to do is read the event log and show the error messages....
1
by: deba2learn | last post by:
Hi, Can anyone tell me how I can able to catch system event like delete, rename etc through .NET. This means suppose someone want to delete a file from file system and press Shift + Delete. I...
2
by: Akkad | last post by:
Hi everyone ..... i am designing a web site and on the login page i want to embeed a security code but i don't know from where to install the library or even the function who create the picture of...
13
by: oruccim | last post by:
hii my friends; I want to create picture of security code.can i do it ? if yes,how , which module will help me? have you got a example that can create a picture whit my name pls help me thansk...
1
by: Ahmad | last post by:
Hi, I am developing a desktop based application that will pull data from a site for a specific keyword. The site I am using is http://freekeywords.wordtracker.com/ Now to search a keyword...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.