Get errors with VB Sample

smiles

Well-known member
Joined
May 21, 2008
Messages
47
Programming Experience
Beginner
I download 101 VB.Net Samples and one of them is How to TCP remoting and here is the Readme file
Advanced: Remoting

This sample is designed to show how to use the .NET Remoting architecture using three types of remote objects. In addition, it uses XML configuration files to specify available objects and server location information instead of hard-coding them into the binaries or putting the data into the system registry.
Featured Highlights

The sample contains three solutions:

* VB.NET How-To Remoting - Server
* VB.NET How-To Remoting - Host
* VB.NET How-To Remoting - Client

Each solution has one project.

One of the projects (RemoteCustomer) is a class library that exposes three creatable types:

* Customer (client activated)
* SingleCallCustomer (WellKnown singlecall)
* SingletonCustomer (WellKnown singleton)

To make it easier to configure, each class lives in the same namespace, RemotingSample, which is defined in each class source file.

The Host project contains a Windows Forms application that will read an XML configuration file named Host.exe.config to make available the classes defined in the RemoteCustomer project. For a production application, you might want to host the class library (RemoteCustomer.dll) in a Windows service.

The Client project is also a Windows Forms application. It relies upon a configuration file named Client.exe.config to know where to look for the remote objects.
Requirements

Requires the Trial or Release version of Visual Studio .NET Professional (or greater).
Running the Sample

Before running the demo, you need to build all three projects. You should build them in this order:

1. RemoteCustomer
2. Host
3. Client

Once the binaries have been build, you will need to start the Host application first to make sure your objects are available for remoting. Next start your client.

If you wish to test on two different machines, you will need to make changes to the client's .config file changing localhost to an IP address or DNS name for the server machine. In addition, you might need to change the server's file if you change the port number. See the comments in both the client's .config file and the host's .config file for examples.
Last Update: 7 July 2002
When I try to build the server part (it contains no forms, just .vb files), it says "A project with an output type of class library cannot be started directly. In order to debug this project to this solution which references the library project. Set the execute project as the start up project"
When I build the host, it says "Visual Studio cannot start debugging because the debug target E:\Documents\VB.Net\101 VB.NET Samples\VB.NET - Advanced - Remoting - How-To TCP Remoting\Host\bin\Host.exe is missing. Please build the project and retry or set the output path and assembly name properties appropriately to point at the correct location for the target assembly"
Could you tell me ways to fix them, thanks so much !!!
 
Note that "Build" means "Build", and not "Build and run in debugger", ie you can't press the "play" button. RemoteCustomer class library is the remoting object used by the client and server applications, it must be built before you can build these.
 
Back
Top