473,729 Members | 2,188 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 2021

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: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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.