473,799 Members | 3,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 MarshalByRefObj ect

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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim myRemobj As New MyRemType
RemotingConfigu ration.Configur e("Client.exe.c onfig")
MsgBox(myRemobj .ReturnaAString )
End Sub
End Class

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

<configuratio n>
<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()
RemotingConfigu ration.Configur e("Listener.exe .config")
Console.WriteLi ne("Listening for requests. Press Enter to exit...")
Console.ReadLin e()
End Sub
End Class

'Server app config file

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

Nov 19 '05 #1
0 1432

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

Similar topics

0
2928
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 use them. No IIS. Use TCP, binary. Standard server example with a console host and console client. .NET 1.1, windows XP. (I tried posting to the remoting newsgroup, no answers in the last couple days, trying here in hopes that more people watch this...
1
1430
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 information: Because of security restrictions, the type System.Runtime.Remoting.ObjRef cannot be accessed."
4
3118
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 it a go). What I want to do is this: Have a server instance of the program, this server instance will receive communication from client programs (as demonstrated in the AddMessage()
3
1641
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 options: one is a local windows application,and the second is a web application The administrator can either delete messages,add new messages,and send messages
7
1658
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 user in the network which has application running should automatically see the change. in case of remove action, the item should disappear from the listview.
8
1754
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 package) to .NET. Our clients have been asking for lot of new stuff namely being able to send patient information to devices, being able to fix appointments online, etc.
6
3183
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 just I can make them communicate over the internet. -- Mike
4
6650
by: Rich | last post by:
Can anyone suggest a good (current) tutorial on how to do basic remoting with C# (2005 express edition)?
0
3404
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); I get the following error - doesn't matter if I try it local from my machine or from a remote machine. (After the Errormessage is more text ;))
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10247
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10214
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.