Hi,
VS.Net does not allow you to make a reference to .exe. But the c# command
line compiler does.
Also, this is not good approach at all. You have to consider a different
one, I'll order them in the way I do prefer it (1-st one is less
recommended, etc.):
1. Put your remote class in a separate assembly (dll), and reference to it
both from client and server.
2. Put your remote class in a separate assembly. Reference it from the
server. Use soapsuds.exe to extract the metadata from that assembly, and
reference the result from the client. This way you do not ship your
original class with the client. There a lot of problems with soapsuds.exe,
so even it is a possibility, I would not recommend using it.
The next 2 approaches are highly recommended:
3. Create and abstract class, which inherits from MarshalByReffer enceObject
and contains all the methods you are going to use with remoting. Then make
your remote class inherit from it, and reference it from the server. At the
client, reference the abstract class assembly only, and your client will
cast the remoted object to the abstract class. And you will have all needed
to invoke the remote object. And you are not going to ship your code with
the client.
You may take a look to Allen Anderson's article for this:
http://www.glacialcomponents.com/Art...D=RemoteObject
4. This is my favorite. It is very similar to the previous one, but instead
of using abstract class, use interfaces. In my opinion, this is better,
because of the limitations you have with abstract classes (no multiple
inheritances). And is more flexible and scalable.
Also, I'd suggest that you use framework.remot ing newsgroup for remoting
related questions. There are a lot of good examples and answers already.
Use groups.google search, or microsoft site for searching.
Hope that helps
Sunny
"Richard Lewis Haggard" <HaggardAtWorld DotStdDotCom> wrote:
I know this is a really simple thing but it is not intuitively obvious on
how to do this the first time.
I've created a remote server which lives in an EXE. This compiles.
I've create a client of the remote server which fails to compile due to a
failure of the 'using' line that would import the server class's
definition. I can't figure out how to add the server as a reference
because the server is an EXE, not a DLL.
So - how do I import the class information from my server into my client?
=======
Richard Lewis Haggard