473,408 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Remote Custom Types

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.
Apr 6 '07 #1
4 1347
rkozlin,
There is no "magic" going on here either with classic Remoting or WCF. In
order for a type to be remoted over the transport, it has to be able to be
serialized and deserialized. I believe you have answered your own question.

Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"rkozlin" wrote:
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.
Apr 6 '07 #2
The short answer is you can't. The assemblies must be on both client
and server.

Apr 6 '07 #3

You can distribute an Interface to the client, and not the actual assemblies
themselves.

so in assembly1.dll , you'd have
IEmployee

and on the server you'd have
assembly1.dll (also)
and
assembly2.dll
Employee : IEmployee

and the client doesn't have to have the assembly2.dll or the Employee
object.

I'm not sure if this helps or not. I wasn't clear on your post or needs.

http://sholliday.spaces.live.com/blog/
9/27/2005
Leveraging Dot Net Remoting To Keep Your "Secret Code" Safe
"rkozlin" <rk*****@discussions.microsoft.comwrote in message
news:6F**********************************@microsof t.com...
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.

Apr 7 '07 #4
On Apr 7, 10:48 am, "sloan" <s...@ipass.netwrote:
You can distribute an Interface to the client, and not the actual assemblies
themselves.

so in assembly1.dll , you'd have
IEmployee

and on the server you'd have
assembly1.dll (also)
and
assembly2.dll
Employee : IEmployee

and the client doesn't have to have the assembly2.dll or the Employee
object.

I'm not sure if this helps or not. I wasn't clear on your post or needs.
I don't think this will work; the client still needs to instantiate
instances of the concrete classes for remoting to work.

Apr 9 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Marina Anufreichik | last post by:
Hi, After deploymnet web application on web server I can access page on local machine and login fine but when I'm trying to access web site from remote machine I can see login page, but when I'm...
1
by: Vivek | last post by:
HI Everyone, I am trying to dynamically load a custom deployed assembly from the GAC of a remote machine so that i could call its method from my code using reflection. Can anyone tell me how do i...
6
by: KV | last post by:
Anybody here created an agent? I need to create an agent that runs as a Windows service. The agent would listen on a certain TCP port and run executable files sent to it from a master program. ...
2
by: gilberto ramirez | last post by:
I want to create an ASP application in the following way: PC1 - Windows XP (SP1) with VS .NET (and everything needed) - im programming with C# .NET SRV1 - ISA SERVER - Windows 2000 (SP3) SRV2...
3
by: Matthew Louden | last post by:
My ASP.NET application is running without error in my local machine (IIS PWS). However, once I upload all the ASPX files to the remote IIS machine with Windows Server 2003 OS, it no longer works. ...
6
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
4
by: techsupport | last post by:
I have some experience with .NET Remoting, as well as ASP.NET 2.0, and have been wanting to remote a custom membership and profile provider. I want to take advantage of the new controls in ASP.NET...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.