|
| .Net Remoting Question |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.distributed_apps.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| CEP921 (VIP) |
Hi All. In preparation for exam 70-310, i've been working a chat application (refer to Lab 4 in MCAD/MCSD Self-Paced Training Kit) that consists of a server-activated remotable object (ChatCoordinator.dll), a console application that configures the ChatCoordinator object (Server.exe), and a client console application (Client.exe) that sends messages to the ChatCoordinator which then sends the messages to other clients.
The application works fine while running on my local machine, but when I try to run the Client from a machine on my network I get the following error:
Unhandled Exception: System.IO.FileNotFoundException: File or assembly name ChatCoordinator, or one of its dependencies, was not found. File name: "ChatCoordinator" at ChatClient.Run() at ChatClient.Main()
Does anyone have any ideas? I can post the Class modules and/or the configuration files.
Regards, Chad
|
|
|
| |
|
|
| |
| |
| Sam Santiago |
Yes, you must deploy the ChatCoordinator assembly with your client even though the ChatCoordinator will run on another machine. Your client must be able to access the metadata of the remote object you are creating, the ChatCoordinator. I have this book and this example tries to keep things simple in order to understand the basics. There are ways around deploying your remote object's assembly with your client. Check out step #5 on this link:
Basic Remoting Task List http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconBasicRemotingTaskList.asp
Thanks,
Sam
-- _______________________________ Sam Santiago Click here to reveal e-mail address http://www.SoftiTechture.com _______________________________ "CEP921" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
| |
| |
| CEP921 (VIP) |
Thanks Sam, That was very helpful. Hopefully you can help me again. I've expanded upon the example in the book. I've replaced the Server.exe with a Windows Service name HomeChatServer that calls RemotingConfiguration.Configure(Central.config) when the service starts. I've replaced Client.exe with a multi-class/module Windows Application. The initial form (SelectNameForm.vb) displays a listbox of usernames (populated by an Xml Web Service). Once the user select a username they are sent to another form (ChatClientForm.vb) that has two RichTextBoxes (one displays all the messages and one is for data entry of a new message). There is a class (ChatClient.vb) that interacts with ChatCoordinator.dll in much the same way as in the example in the book, except that instead of writing messages to the console it raises an event that is handled by the ChatClientForm which then writes the message to the Display RichTextBox.
My problem is compiling. How do I reference the ChatCoordinator.dll when compiling an assembly? In the books example they compiled a single file, like so:
vbc /r:ChatCoordinator.dll Client.vb
Thank you very much for your time and your help.
Many Regards, Chad
"Sam Santiago" wrote:
[Original message clipped]
|
|
|
| |
|
|
| |
| |
| Sam Santiago |
It should work the same way essentially. The /r option on the vbc command is short for /reference which means the assembly files listed after the /r command will be referenced as part of the compile of the main assembly or executable being compiled. Copy the ChatCoordinator.dll assembly to the directory where you are compiling your Client.vb program. If you are developing within Visual Studio you can also simply add the ChatCoordinator.dll as a reference in your References folder underneath your project.
Thanks,
Sam
-- _______________________________ Sam Santiago Click here to reveal e-mail address http://www.SoftiTechture.com _______________________________ "CEP921" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
Service name HomeChatServer that calls RemotingConfiguration.Configure(Central.config) when the service starts. I've replaced Client.exe with a multi-class/module Windows Application. The initial form (SelectNameForm.vb) displays a listbox of usernames (populated by an Xml Web Service). Once the user select a username they are sent to another form (ChatClientForm.vb) that has two RichTextBoxes (one displays all the messages and one is for data entry of a new message). There is a class (ChatClient.vb) that interacts with ChatCoordinator.dll in much the same way as in the example in the book, except that instead of writing messages to the console it raises an event that is handled by the ChatClientForm which then writes the message to the Display RichTextBox. [Original message clipped]
like so: [Original message clipped]
|
|
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|