I have a Application where I need to create AppDomain and Load Assembly into it and execute the methods in the Assembly.
Here is my Code
public class CreateAppDomain
{
public void CreateAppDom()
{
AppDomain domain = AppDomain.CreateDomain("myDomain");
domain.ExecuteAssembly(@"C:\Visual Studio 2005\Projects\A1\A1\bin\Debug\A1.dll");
domain.CreateInstanceFrom(@"C:\Visual Studio 2005\Projects\A1\A1\bin\Debug\A1.dll","A1.Navigate");
}
}
I above code is written in a classfile called CreateAppDomain.cs
In my Default.aspx page I created the instance of the above class and called the create method.Here is the code
protected void Button1_Click(object sender, EventArgs e)
{
CreateAppDomain obj = new CreateAppDomain();
obj.CreateAppDom();
Response.Write("Application Domain Successfully created");
}
when I run the default.aspx page I get a error saying
Entry point not found in assembly 'A1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Can Anyone explain me the meaning of above error and solution to it.
Thanks,