C# - Late Binding In Child AppDomain - Develop A Plugin Architecture

Oct 1, 2010

I am trying to develop a plugin architecture in .Net. The application will be a .Net application. There will be directories which holds the plug-ins. Each directory will represent a plugin. Each plugin directory will also contain all the dependency dlls as well. The plugins need to be stored in separate AppDomain as the plugins may use the same assemblies, but different versions. As it iterates through the foreach loop in Init(), I get a System.IO.FileNotFoundException : Could not load file or assembly '[Assembly Name], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.in _apDomain.Load() for assemblies that are not in the main project.

readonly private AppDomain _appDomain;
internal ItemModuleAppDomain()
{
AppDomainSetup info = AppDomain.CurrentDomain.SetupInformation;
_appDomain = AppDomain.CreateDomain("ChildDomain");
}
public void Init(string dllDir)
{
string[] dlls = Directory.GetFiles(dllDir, "*.dll", SearchOption.TopDirectoryOnly);
foreach(string dll in dlls)
{
_appDomain.Load(AssemblyName.GetAssemblyName(dll));
}

View 1 Replies


Similar Messages:

MVC :: Error - Late Binding Operations Cannot Be Converted To An Expression Tree

Nov 12, 2010

I get this error "Late binding operations cannot be converted to an expression tree."

[code]....

View 5 Replies

Develop User Defined Plugin For Web Browser

Jan 31, 2011

How to develop a user defined plugin for a web browser. It should features: It should be installed in any browsers. It should be executed whenever the browser starts. It should monitor the web page and access the web page that the browser displays. It should monitor and access the web page (for example, getting a value from a text box) irrespective of the web page the browser displays. (The web page can be of any URL either google or any domain)

View 3 Replies

Architecture :: How To Develop An App Using 3 Tier Architecture

Aug 18, 2010

i want to develop an application in asp.net using 3 tier architecture .

i know that there are three layers

Data layerBusiness Layer

Data Access LayerBusiness Logic Layer Presentation Layer. I am confused between Data Access Layer and Business Logic Layer.

In data access layer we develop the property classes and main class function which returns datasets, datatables and data reader to Presentation layer.

what is the use of Business Logic Layer ? what actually we do in Business logic Layer
?? we can pass data directly from data access layer to presentation layer ?

View 6 Replies

.NET Plugin Architecture Without Using Reflection Or Static Constructors?

Nov 11, 2010

I have an ASP.NET HttpModule that is distributed as a DLL. I badly need a plugin architecture so I can isolate some heavyweight, rarely used features into external .dlls, and speed up/slim up the core functionality.I've experimented with (1) reflection and (2) static constructors.It seems GoDaddy and a few other web hosts prohibit use of Reflection, making #1 useless..NET 4.0 now calls static constructors lazily, eliminating #2.

How can I have a generic plugin registration system that doesn't require C# or VB code to register the plugins? Even a web.config plugin registration list would be fine, but I don't know how to do that without using reflection.

Update: I need this to work in .NET 2.0 as well as higher versions

View 1 Replies

How To Develop 3 Tier Architecture In Asp.net Using C#

May 31, 2010

can any one tell about 3 tier architecture in asp.net using C#How can i develop a project using 3 tier?

View 8 Replies

Architecture :: Going To Develop A Web Based Application With C#?

May 30, 2010

i am going to develop a web based application with c# but i am very upset that how to design a good pattern how to code to let the program more efficient.

View 3 Replies

Architecture :: How To Develop Web Application With Sub-Apps

Jun 18, 2010

I'm starting to think about and develop an architecture for a big web application, and I wanted to get suggestions and/or recommendations on which technologies and/or frameworks to use.The application will be an Intranet-based web site using Windows authentication, running on IIS and using ASP.NET. It'll need to be structured as a main web application with sub-web applications. Essentially, the entire scope is a composite browser-based,Intranet application that is composed of discrete, functionally complete modules or sub-applications.

View 1 Replies

C# - Reuse Loaded Assemblies In Web-Based Plugin Architecture. Maximize Performance

Aug 6, 2010

Edit: I would like to keep the infrastructure as is, so while the framework ideas are appreciated, please keep your suggestions centered on the context I have provided.

Background

I'm building a web-based application that dynamically loads plugins. Each plugin comes with a manifest file that contains its dll location, namespace, and type.

Right now I'm using System.Reflection.Assembly.LoadFile to load up the dlls based off the locations provided in the manifest files. Then I load the types and so on.

As an Aside:
I may wind up changing to System.Reflection.Assembly.LoadFrom since I'll eventually be loading files from outside the bin directory. But if their is a better way (Assembly.Load or something), feel free to add that in as well

Problem

The problem is that Multiple plugins can potentially run off the same dll. So I wind up executing System.Reflection.Assembly.LoadFile("Identical.dll") multiple times.

I have the idea to check if my assembly has already been loaded by iterating through AppDomain.CurrentDomain.GetAssemblies(), but I don't know if that will help with performance (or if it will work period, I haven't tried it).

Also, I can't keep a list of loaded assemblies due to the project's design constraints (though you may argue that it's a poor design: I can't change it, even if I wanted to OR agreed with you... so please don't press the issue.

Ultimately my goals are:

Don't ever re-load the same assembly twice. Performance is key.

View 3 Replies

Architecture :: How To Develop MVP Architecture

Jun 21, 2010

I am using Technologies .NET3.5,C#.net,Sqlserver2005,WCSFWe want to develop a project in wcsf, will it be good and easy??.What is wcsf just briefly. How to develop MVP Architecture.Mainly I gather some information on wcsf, and i got some knowledge but i want sample application or project to get knowledge to develop a project.i am not getting any sample application google, and proper meterial also not there, is it failed or succeeded. if develop project in that will iget any problems in development.

View 3 Replies

MVC :: Binding A Child Table To A Form?

Feb 23, 2011

I think I may have done this wrong. I have a form with radio buttons and checkboxes. Each one of the checkboxes values are in a separate row in the table. How do I bind the values of the checkboxes to the controls. I cannot do a for each because that would repeat the HTML in the view around the checkboxes.

View 3 Replies

MVC :: Parent - Child Relationship And Model Binding

Jul 30, 2010

how controls (txtbox, radio, etc) are mapped to properties in my Model. Now to the next part : My scenario (example):

Model: three tables: tblPerson, tblPersonOptions, tblOptionsConfig
UI:
Person Name: ______ (required)
Person Age: ________ (required)

radio button: Does Person want to select options? Yes / No ? (required) If yes, then show a checkbox list of options from tblOptionsConfig: (required if yes above). Scenario I tested:

Person Name: Tester User Person Age: Left blank (check if validation error is thrown)
Radion button: Yes. in options check ..let's say 3 out of 5 options. The UpdateModel throws the validation error and the page is returned back to the view(add.aspx).....................

View 9 Replies

Architecture :: Database Design For Parent-child Module?

Feb 15, 2011

i am making an application which is like chain system..i mean one person can have multiple child.. then his child can have multiple child ..etc like chain system...i dont know to insert into database.. so that when i call any-node.. his child,, and their futher child will show...

View 14 Replies

AJAX :: Loading AutoCompleteExtender Is Too Late / How To Optimize

Oct 21, 2010

I posted a question about using AutoCompleteExtender. It simply shows users all available email addresses when they type in a letter(prefix).

It works, but the problem is it loads to late :( takes around 5 seconds to pull out the list.

So I would like to optimize this

The part I would like to optimize speed is:

[Code]....

View 11 Replies

Data Binding In 3 Layered Architecture?

Feb 16, 2010

Does data binding fit in a 3 layered architecture? Is dropping a grid-view on a web form and binding it to a LinkDataSource or SQLDataSource considered bad? The way I see it, that's the Presentation Layer talking to the Data Access Layer. I once heard a "professional developer" say never ever do this, so what's the alternative if you shouldn't?

View 3 Replies

Binding Data To A GridView From A Object With Child Objects Containing Relevant Fields

Jul 16, 2010

I have a List of complex objects containing other objects within that I give as the data source to a gridview.(currently I'm using BoundFields for the columns). I need to bind data to the columns from the objects within at run time. How can this be done?

View 1 Replies

MVC :: Saving A Complex Child Object After Post (LINQ To SQL Model Binding With MVC)

Jan 6, 2011

I am using ASP.Net MVC2 and LINQ to SQL. I am using DataAnnotations and model binding in conjunction with a Form/View and its working beautifully well. Loving that.. My view is an "Add new Employee" form that's adding a new "Employee" complex object. Every Employee also has a child complex object called an "Address".
I am using the bound Html helpers in the view, such as Html.TextBoxFor(model => model.NewEmployee.FirstName) for example. Working beautifully well, validating beautifully well both client and server and coming into the controller fully populated and ready to be saved! Exciting.. ModelState.IsValid returns true and I go to save the new Employee.

The Employee is created fine but the system also creates a blank/new Address record in my Addresses table even when the Address fields are blank! How can I prevent any Address from being created, in situations where I ONLY want to create a new Employee with no Address. An example is when the user supplies an existing Address, then I wish to simply set the new Employee's AddressID to that of an existing physical address (I hope that makes sense). But it could apply to any situation where you need to create a new complex object, but you don't wish for LINQ to create any of its child complex objects. I have tried setting NewEmployee.Address = null after it is received in the controller, but even after that, a blank/new Address is still created. Even if I try NewEmployee.Address = SomeExistingAddress, it does correctly link the Employee to the existing Address, but it STILL goes off and creates another redundant new/blank address record! Which is really weird..

View 10 Replies

MVC + LINQ To SQL Model Binding - Saving A Complex Child Object After Post

Jan 5, 2011

I have a "Create New Employee" ASP.Net MVC form. My complex object is an Employee and an Employee has an Address, which is another Complex object. On my View/Form I collect all required values for both the Employee and the Address. I'm using the bound HTML helpers such as: Html.TextBoxFor(model => model.EmployeeAddress.StreetName)

AND

Html.TextBoxFor(model => model.NewEmployee.FirstName)

This is all working beautifully well. Model binding is working like a dream, both server side and client side validation using DataAnnotations is working beautifully well and I am nicely receiving my populated complex objects as expected in the Controller.. Now I'm trying to save.. The Employee should always be newly created, because its an "Add New Employee" form. But sometimes the Address is an existing Address and I don't want to insert another one. Rather, I just want to link the Employee to the existing AddressID of the one that already exists in the database.

So I wrote a nifty GetExistingOrCreateNewAddress(Address PostedAddress) method which works great so I end up with the correct Address to use and link to the about to be saved Employee object. This is all happening in the same DataContext, so no problems there..

BUT even when I link the about to be saved Employee object to an existing Address, on save a new/empty Address row is created in my Addresses table. Even though the newly created Employee does link correctly to the existing Address I told it to! Why is it so??? And how can I save the new Employee without LINQ automatically creating a blank Address for me. Because I'm explicitly specifying an existing Address it should be linked to instead!

[HttpPost]
public ActionResult CreateEmployee(EmployeeDetailsViewModel NewEmployeeDetails)
{
if (ModelState.IsValid)
{
EmployeeRepository ER = new EmployeeeRepository();
// Fetch or Create the appropriate Address object for what has been entered
Address ActualAddress = ER.GetExistingOrCreateNewAddress(NewEmployeeDetails.EnteredAddress);
// Link this Address to the "about to be saved" Employee
NewEmployeeDetails.Employee.Address = ActualAddress;
// Lock it in..
ER.SaveNewEmployee(NewEmployeeDetails.Employee);

View 2 Replies

Forms Data Controls :: Gridview Binding To A Particular Child Nodes In An Xml File?

Feb 10, 2011

<VegaMessage Type="EX_ACK_PEN" Value="A">
<VegaField Tag="11" Value="$11" Name="ClientOrderID(11)" />
<VegaField Tag="54" Value="$54" Name="Side(54)" />
<VegaField Tag="55" Value="$55" Name="Symbol(55)" /> [code]....

I have an xml file like this.I wnat to display a gridview when i click on the EX_ACK_PEN i want to display a gridview with fields Tag,Value,Name.How can i get the childnode values .

View 7 Replies

Architecture :: How To Develop A Project(web Project) Based On The MVP Pattern

May 6, 2010

i know some thing about the MVP pattern... but when you want to develop a project(web project) based on the MVP pattern from where we need to start... i mean which component we need to start developing first ...
Model or View or Presenter... what are the points that we need to keep in mind....

View 4 Replies

Architecture :: Data Binding To Entity Framework Classes?

Feb 1, 2011

I am using the ADO.NET Entity Framework for loading data from the database. The classes are directly mapped to database tables in the database. The problem is that these classes are not optimal for binding to the UI elements. As a result of this I have some custom entities which are populated at the service layer and returned. It is these custom entities (classes) to which I bind the UI elements. My questions on this are1. Is populating these entities at the service layer the most appropriate way to do this. I personally do not think so because if we introduce some additional UI elements which need different entities then I have to modify the service layer again.2. What is the best approach/pattern to get this done.

View 2 Replies

Forms Data Controls :: Binding A Repeater To A List Of Objects That Have Child Objects?

Nov 17, 2010

have some Objects, lets say Employee and Role defined as below and I have defined relationships in my database that gives me a list of objects say employees and thanks to my framework each employee object also has a Role object linked via the RoleIDID, UserName, Password, Email, RoleIDRoleID, RoleNameSo in code I can do something like this

Employee emp = dataService_GetEmployeeByID(1);
string RoleName = emp.Role.RoleName;

Now here is my problemI can bind any object in a repeater and it works fine for the first level in my relationship

For instance <%# Eval("UserName") %>

But I need to be able to show the details for my child objects as well (Role) so something like this (which does not work)

<%# Eval("Role.RoleName") %>

View 2 Replies

Receiving Object Reference Not Set To An Instance Of An Object When Binding Child DataGrid?

Mar 12, 2010

I am receiving Object reference not set to an instance of an Object when binding Child dataGrid in the ItemCommandEvent of Parent dataGrid.

[code].....

View 1 Replies

Forms Data Controls :: Binding Parent Repeater Item Index In Child Repeater Control?

Jun 17, 2010

I want to bind parent repeater item index in child repeater control using inline code not code behind side.

For example

[Code]....

View 2 Replies

Architecture :: Binding Of Gridview With Database Versus XML Layer / Database

Apr 13, 2010

I am having serious performances issues with gridview + tabs. Its very slow.. I was thinking to create a XML based logical layer between my database and UI.

1) Will it be useful if i use webservice to get data from database to poppulate gridview?

2) or Use xml + some service (need advice on it)

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved