Click here to Skip to main content
15,915,324 members
Home / Discussions / C#
   

C#

 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
kudorgyozo9-Jul-07 1:54
kudorgyozo9-Jul-07 1:54 
AnswerRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 1:59
sam#9-Jul-07 1:59 
Generalstill not working... Pin
kudorgyozo9-Jul-07 2:10
kudorgyozo9-Jul-07 2:10 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 2:21
sam#9-Jul-07 2:21 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
kudorgyozo9-Jul-07 2:35
kudorgyozo9-Jul-07 2:35 
GeneralRe: After editing a dataset my changes are not visible in the datagrid Pin
sam#9-Jul-07 2:58
sam#9-Jul-07 2:58 
Questionproblem in running c# using sql server in other client Pin
asdf17539-Jul-07 1:28
asdf17539-Jul-07 1:28 
AnswerRe: problem in running c# using sql server in other client Pin
originSH9-Jul-07 1:33
originSH9-Jul-07 1:33 
Questionproblem in running c# using sql server in other client Pin
asdf17539-Jul-07 1:27
asdf17539-Jul-07 1:27 
AnswerRe: problem in running c# using sql server in other client Pin
Paul Conrad13-Jul-07 13:15
professionalPaul Conrad13-Jul-07 13:15 
QuestionXMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 1:17
ramdil9-Jul-07 1:17 
AnswerRe: XMLHTTP40Class Status 500 error. Pin
Pete O'Hanlon9-Jul-07 1:37
mvePete O'Hanlon9-Jul-07 1:37 
GeneralRe: XMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 2:40
ramdil9-Jul-07 2:40 
AnswerRe: XMLHTTP40Class Status 500 error. Pin
Vasudevan Deepak Kumar9-Jul-07 2:04
Vasudevan Deepak Kumar9-Jul-07 2:04 
GeneralRe: XMLHTTP40Class Status 500 error. Pin
ramdil9-Jul-07 3:01
ramdil9-Jul-07 3:01 
QuestionCheckbox in datagrid [modified] Pin
pmartike9-Jul-07 0:42
pmartike9-Jul-07 0:42 
AnswerRe: Checkbox in datagrid Pin
Ron.S9-Jul-07 1:04
Ron.S9-Jul-07 1:04 
GeneralRe: Checkbox in datagrid Pin
pmartike9-Jul-07 1:15
pmartike9-Jul-07 1:15 
AnswerRe: Checkbox in datagrid Pin
sam#9-Jul-07 1:57
sam#9-Jul-07 1:57 
GeneralRe: Checkbox in datagrid Pin
pmartike9-Jul-07 2:14
pmartike9-Jul-07 2:14 
GeneralRe: Checkbox in datagrid Pin
sam#9-Jul-07 2:23
sam#9-Jul-07 2:23 
QuestionNunit Testing...?? Pin
Software_Specialist9-Jul-07 0:27
Software_Specialist9-Jul-07 0:27 
AnswerRe: Nunit Testing...?? Pin
Pete O'Hanlon9-Jul-07 0:48
mvePete O'Hanlon9-Jul-07 0:48 
QuestionCross AppDomain Exception Handling. Plugin architecture. [modified] Pin
Abdul Gafoor9-Jul-07 0:25
Abdul Gafoor9-Jul-07 0:25 
Hi all,

I want to handle a unhandled exception thrown by a plugin running in its own appDomain (ie not Defualt appDomain) in defualt appDomain (host appliation), and then unload the culprit appDomain..

Is it really possible to handle this kind of cross appDomain exception. the exception may occur any time during the life time of plugin appdomain ( say some buttton in the plugin throws some unhandled exception..)

please have a look on the sample code given below.. What should i do handle the exception thrown by button1.. I never want to close my host application at any cost. it should continue its execution whatever happens in plugins..

please give me guide lines.


//********************* Plug in *******************************

public class BadPlugin: Form,IPlugin
{
private System.Windows.Forms.Button button1;

public StaffList()
{
InitializeComponent();
}

private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(232, 96);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(176, 48);
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// StaffList
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(488, 302);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Name = "StaffList";
this.ResumeLayout(false);

}

private void button1_Click(object sender, System.EventArgs e)
{
throw new Exception("Bad plgin exploded exception");
}

}


//********************* Plug in Interface *******************************


public interface IPlugin
{
void Show();
}


//******************** Plug in Host Application***************************


try
{

AppDomain app = AppDomain.CreateDomain("PluginDomain");
IPlugin plugin = (IPlugin)app.CreateInstanceAndUnwrap("SamplePlugins","SamplePlugins.BadPlugin");

plugin.Show();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}


Thanks and regards
123developer


-- modified at 1:06 Tuesday 10th July, 2007
AnswerRe: Cross AppDomain Exception Handling. Plugin architecture. Pin
originSH9-Jul-07 0:48
originSH9-Jul-07 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.