Is it possible to remotely host custom types?
Some background...
We have an application that uses custom user controls as 'templates' for
entering certain kinds of data. The application is designed to get a list of
the possible user controls / templates from the database. The user controls
are all actually derived classes and their base class inherits from
UserControl. So the app is then able to dynamically load the types based on
the information it has from the database (assembly path and type) and
implements them as the base class type. The idea being that we want to be
able to add templates to the application post-release without having to
recompile the entire application.
As we release new templates they are usually in their own assembly. So we
have had to get them to the application's 'templates' subfolder prior to
attempting to load their types. We have built this into the application's
launch.
The above is functioning just fine. Issues arise though with an evolution
of the application that is in the works. Parts of the app's UI will need to
be available for many of our internal apps to use - including the piece that
allows data entry through these templates. Now, managing the deployment of
these assemblies for one application has been fine, but this is going to
become a PITA if we have to deploy them to any other application that needs
them.
I'd like to do this without having the UI piece manage the copying of these
DLLs from some server share.
So I've been looking into WCF and have been trying to return these templates
from a method on a WCF Service. I keep getting some errors such as
"The socket connection was aborted. This could be caused by an error
processing your message or a receive timeout being exceeded by the remote
host, or an underlying network resource issue. Local socket timeout was
'00:00:59.5190000'."
I am figuring this has something to do with trying to serialize an object or
objects that are deriving from UserControl which is not serializable. Am I
correct? If I attempt to use BinaryFormatter on the collection of templates
I get an error basically saying just that.
How can I host these templates and/or their types to the client application?
I am trying to do this WITHOUT copying DLLs to the client.