473,735 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embedded .net Windows Forms Control Security Issue

I have been trying to use a .net Forms control in my webpage to open up
an application(not epad) on the client. The control works fine when
embedded in a windows form, but I keep getting a security exception
when trying to run it from my webpage on my intranet. I have tried
playing with the Code Access Security settings, but I can't get it to
What do you think?


System.Security .SecurityExcept ion: Request failed.
System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHa ndle
rmh, SecurityAction action, Object demand, IPermission permThatFailed)
System.Security .CodeAccessSecu rityEngine.Thro wSecurityExcept ion(Object
assemblyOrStrin g, PermissionSet granted, PermissionSet refused,
RuntimeMethodHa ndle rmh, SecurityAction action, Object demand,
IPermission permThatFailed)
System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Perm issionSet
grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHa ndle rmh, Object assemblyOrStrin g, SecurityAction
action, Boolean throwException)
System.Security .CodeAccessSecu rityEngine.Chec kSetHelper(Comp ressedStack
cs, PermissionSet grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHa ndle rmh, Assembly asm, SecurityAction action)
at OpenWinscribe.U serControl1.but ton1_Click(Obje ct sender, EventArgs
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs 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.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage&
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
The action that failed was:
The type of the first permission that failed was:
System.Security .PermissionSet
The Zone of the assembly that failed was:
************** Loaded Assemblies **************
Assembly Version:
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
Assembly Version:
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
file:///C:/WINDOWS/assembly/GAC_MSIL/System/ 561934e089/System.dll
Assembly Version: 1.0.2447.28205
Win32 Version: n/a
CodeBase: http://localhost/WebApplication1/OpenWinscribe.dll
System.Windows. Forms
Assembly Version:
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows. Forms/ 561934e089/System.Windows. Forms.dll
Assembly Version:
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/ 7f11d50a3a/System.Drawing. dll
Assembly Version:
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/ 7f11d50a3a/Accessibility.d ll
Microsoft.mshtm l
Assembly Version: 7.0.3300.0
Win32 Version: 7.0.3300.0
file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtm l/7.0.3300.0__b03 f5f7f11d50a3a/Microsoft.mshtm l.dll

Sep 13 '06 #1
0 2025

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

Similar topics

by: JP Burford | last post by:
I am working on testing zero deployment on Windows 2003 server. The application I am testing is a simple Managed application written in C#. When I access the application I receive the following error: Unhandled Exception: System.ArgumentException: Invalid directory on URL. at System.Security.CodeAccessSecurityEngine.GetZoneAndOriginInternal(ArrayList zoneList, ArrayList originList, StackCrawlMark& stackMark, Int32 checkFrames) at...
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is very broad and gives the entire zone high privleges. I tried giving just the assembly full trust (using the full URL for the DLL), but this doesn't seem to work.
by: A Lonely Programmer | last post by:
Hi group, Consider the following code: Dim dirinfo As New DirectoryInfo("c:\test") Dim fileinfo() As FileInfo = dirinfo.GetFiles Dim fi As FileInfo
by: John Smith | last post by:
Hi folks, I'm embedding a Windows Forms User Control into an aspx web page. I've created the class library in C# and added the user control to it. If the control just has simple Windows Forms Controls (like TextBoxes or Buttons), it works fine. IE treats it wonderfully If I do something a little more advanced though (like connecting to the Outlook Object Model in code, or embedding the Web Browser Control...), then
by: | last post by:
Just a general question... When working with a form containing a treeview or similar control... if you need to show different form fields depending on what is selected in the treeview then what is the best way to deal with these form controls...? Like, when they are all visible in the designer it can be absolute chaos... So how do you guys deal with it? Is there a blank container control (can't see one) that allows you to drop a...
by: L. Chernov | last post by:
Hello, I am trying to work with .Net 2005 WebBrowser object, and put it on a "Windows control library" (embedded in a user control class) and then I am executing it from an ASP.Net webform(with IE6) with the following object tag: <OBJECT id="ModPkiObj" height="550" width="800" classid="http:ModPkiNew.dll#Mod.Online.Client.ModPkiNew.SignForm" name="ModPkiObj" VIEWASTEXT>
by: SMichal | last post by:
Hi, I've got a simple problem when I try to start a new process from my application. I'm starting a new process like this: Process proc = new Process(); proc.StartInfo.Arguments = ""; proc.StartInfo.FileName = @"C:\Submit.bat"; proc.StartInfo.CreateNoWindow = false; proc.Start(); proc.WaitForExit();
by: Budhi Saputra Prasetya | last post by:
Hi, I managed to create a Windows Form Control and put it on my ASP .NET page. I have done the suggestion that is provided by modifying the security settings. From the stack trace, I would assume that the code throws exception when it is trying to retrieve the processes list that has certain name. Below is the code that I use to retrieve the processes. Process processes = Process.GetProcessesByName("xxxx");
by: Budhi Saputra Prasetya | last post by:
Hi, I still have the same problem with embedding Windows Control. I'll just requote what I posted last time: I managed to create a Windows Form Control and put it on my ASP .NET page. I have done the suggestion that is provided by modifying the security settings. From the stack trace, I would assume that the code throws exception when it
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.