.NETGURU
.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.
Post a new message to this list...

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

Reply to this message...
 
    
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]

Reply to this message...
 
    
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]

Reply to this message...
 
    
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]

Reply to this message...
 
 
System.IO.FileNotFoundException
System.Runtime.Remoting.RemotingConfiguration
System.Windows.Forms.RichTextBox




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification