J
Joshua Flanagan
I've seen this question posted in a couple places on the net, but curiously,
nobody has even attempted to respond to it. Since I have also run into the
problem, I will pose it again.
I've built a simple Windows Forms application. It does not require any
special permissions, and runs perfectly when launched from a web server
("smart client").
I then add PropertyGrid control. It runs fine locally, but when I attempt
to launch it from a web server, it fails with a SecurityException: Request
failed.
Does anyone know why the PropertyGrid is considered a security risk?
Unfortunately, the required permissions don't seem to be documented. Anyone
know what I need to grant to users so that they can successfully launch this
application from the web?
I've included below a very simple demo. It will launch successfully from
the web, and then fail when you click the button (which attempts to add a
PropertyGrid).
Any feedback would be appreciated. Thanks.
-Josh
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace TestPropertyGrid
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components = null;
public Form1(){ InitializeComponent(); }
protected override void Dispose( bool disposing )
{
if( disposing ){ if (components != null) { components.Dispose(); }}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(104, 104);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
PropertyGrid myGrid;
myGrid = new PropertyGrid();
myGrid.Dock = DockStyle.Fill;
this.Controls.Add(myGrid);
}
}
}
nobody has even attempted to respond to it. Since I have also run into the
problem, I will pose it again.
I've built a simple Windows Forms application. It does not require any
special permissions, and runs perfectly when launched from a web server
("smart client").
I then add PropertyGrid control. It runs fine locally, but when I attempt
to launch it from a web server, it fails with a SecurityException: Request
failed.
Does anyone know why the PropertyGrid is considered a security risk?
Unfortunately, the required permissions don't seem to be documented. Anyone
know what I need to grant to users so that they can successfully launch this
application from the web?
I've included below a very simple demo. It will launch successfully from
the web, and then fail when you click the button (which attempts to add a
PropertyGrid).
Any feedback would be appreciated. Thanks.
-Josh
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace TestPropertyGrid
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components = null;
public Form1(){ InitializeComponent(); }
protected override void Dispose( bool disposing )
{
if( disposing ){ if (components != null) { components.Dispose(); }}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(104, 104);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
PropertyGrid myGrid;
myGrid = new PropertyGrid();
myGrid.Dock = DockStyle.Fill;
this.Controls.Add(myGrid);
}
}
}