473,382 Members | 1,404 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,382 software developers and data experts.

Please help on remoting

Hi,

I am trying to get my head around remoting. I have managed to configure the
samples on MSDN and that is working fine. I have now tried to build my own
remoting application to test this and i can't get the application to
"Remote" basically what happens is that the client side uses the dll in the
same directory instead of the remote one. I can test this by stopping the
hosting application, and the client still works. I have a feeling that this
has something to do with the configuration file i am using. I will paste
some code below, and i would really appreciate if someone could let me know
where i am going wrong.

Many thanks

Niclas

'Class to be remotable

Public Class MyRemType
Inherits MarshalByRefObject

Public Function ReturnaAString() As String
Dim aString As String = "This is a string"
Return aString
End Function
End Class

''Client application Windows Form

Imports System.Runtime.Remoting
Public Class Form1
Inherits System.Windows.Forms.Form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myRemobj As New MyRemType
RemotingConfiguration.Configure("Client.exe.config ")
MsgBox(myRemobj.ReturnaAString)
End Sub
End Class

''Configration file app.config in the windows form application

<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown
type="MyRemType,MyRemType"
url="http://localhost:8989/MyRemType.rem"
/>
</client>
</application>
</system.runtime.remoting>
</configuration>

''Server console app

Imports System
Imports System.Runtime.Remoting

Public Class Server
Public Shared Sub Main()
RemotingConfiguration.Configure("Listener.exe.conf ig")
Console.WriteLine("Listening for requests. Press Enter to exit...")
Console.ReadLine()
End Sub
End Class

'Server app config file

<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="Singleton"
type="MyRemType, MyRemType"
objectUri="MyRemType.rem"
/>
</service>
<channels>
<channel ref="http" port="8989"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>

Nov 19 '05 #1
0 1410

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

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
1
by: Skip | last post by:
Hi, I get the following exception thrown when I try to run my code: "An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
3
by: Julia | last post by:
I need help with architecture design,please: I have a server which constantly downloading messages from the internet and store them inside a data base. the server have two administrators...
7
by: Mat | last post by:
I am developping multi-user windows application. i use Access database. user edit, add and delete data from database. Request: when an item is deleted ,added or modified by an user, all others...
8
by: Raju Joseph | last post by:
Hi All, I am just trying to get an opinion here. I know this is always a tough choice to make. We are in the process of converting our VB6 based Healthcare Information System (a full-fledged...
6
by: Mike9900 | last post by:
How can I connect my .NET app which use remoting to communicate over internet, 2 instance of the same app? My app is already done using .NET Remoting. I am wondering if to change them to WCF or...
4
by: Rich | last post by:
Can anyone suggest a good (current) tutorial on how to do basic remoting with C# (2005 express edition)?
0
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false);...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.