Hello All,
I am working on a remoting project and i dont know why but the object
created on server side and client side are totally diffrent from each
other.
Even their hash codes are diffrent, which means that i am getting 2
totally diff obj instead of sharing 1 obj between client/server.
Please Help :-SS
Also, can the server application call methods of the shared Object??
The procedure on server side is as follows:-
class NetworkManager
{
public RemDeskBridge rdb;
public NetworkManager( )
{
TcpChannel tc = new TcpChannel(9000 );
ChannelServices .RegisterChanne l(tc,false);
RemotingConfigu ration.Register WellKnownServic eType(typeof
(RemDeskBridge) ,
"RemDeskBridge. rem",WellKnownO bjectMode.Singl eton);
rdb = new RemDeskBridge() ;
}
}
---------------------------------
The procedure on client side is :-
public partial class Form1 : Form
{
RemDeskBridge rdb;
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
TcpChannel tc = new TcpChannel();
ChannelServices .RegisterChanne l(tc,false);
rdb = (RemDeskBridge)
Activator.GetOb ject(typeof(Rem DeskBridge),
"tcp://localhost:9000/RemDeskBridge.r em");
}
----------------------------------------------
Here's the shared class RemDeskBridge between them
public class RemDeskBridge : MarshalByRefObj ect
{
bool isConnected, isAuthenticated ;
string user, pass;
Image img;
//Setter Methods
public void setUP(string u, string p)
{
user = u;
pass = p;
}
public void setConnected(bo ol val)
{
isConnected = val;
}
public void setAuthenticate d(bool val)
{
isAuthenticated = val;
}
public void setImage(Image i)
{
img = i;
}
//Gettter Methods
public bool authenticate(st ring u, string p)
{
if ((u == user) && (p == pass))
return (true);
else
return (false);
}
public bool canConnect()
{
return (!(isConnected) );
}
public Image getImage()
{
return (img);
}
} 1 1380
Hello All,
What's the actual type Activator.GetOb ject gives you? It should be something
to the tune of TransparentProx y or RealProxy (not sure which one exactly).
If it is the case, your Remoting scenario most likely works properly. Also, can the server application call methods of the shared Object??
Not sure. Can you please ask in microsoft.publi c.dotnet.framew ork.remoting?
"TELOPHASE" <te*******@gmai l.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. . Hello All, I am working on a remoting project and i dont know why but the object created on server side and client side are totally diffrent from each other. Even their hash codes are diffrent, which means that i am getting 2 totally diff obj instead of sharing 1 obj between client/server. Please Help :-SS
Also, can the server application call methods of the shared Object??
The procedure on server side is as follows:- class NetworkManager { public RemDeskBridge rdb; public NetworkManager( ) {
TcpChannel tc = new TcpChannel(9000 ); ChannelServices .RegisterChanne l(tc,false); RemotingConfigu ration.Register WellKnownServic eType(typeof (RemDeskBridge) ,
"RemDeskBridge. rem",WellKnownO bjectMode.Singl eton); rdb = new RemDeskBridge() ;
} } --------------------------------- The procedure on client side is :- public partial class Form1 : Form { RemDeskBridge rdb; public Form1() { InitializeCompo nent(); }
private void Form1_Load(obje ct sender, EventArgs e) {
TcpChannel tc = new TcpChannel(); ChannelServices .RegisterChanne l(tc,false);
rdb = (RemDeskBridge) Activator.GetOb ject(typeof(Rem DeskBridge),
"tcp://localhost:9000/RemDeskBridge.r em"); } ----------------------------------------------
Here's the shared class RemDeskBridge between them
public class RemDeskBridge : MarshalByRefObj ect { bool isConnected, isAuthenticated ; string user, pass; Image img; //Setter Methods public void setUP(string u, string p) { user = u; pass = p; } public void setConnected(bo ol val) { isConnected = val; } public void setAuthenticate d(bool val) { isAuthenticated = val; } public void setImage(Image i) { img = i; } //Gettter Methods public bool authenticate(st ring u, string p) { if ((u == user) && (p == pass)) return (true); else return (false); } public bool canConnect() { return (!(isConnected) ); } public Image getImage() { return (img); } } This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: anders |
last post by:
Hi!
I have a config file that looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="SingleCall" type="Interfaces, IMyFirstRemotableObj" objectUri="ControlCenter" />
</service>
|
by: bettervssremoting |
last post by:
To view the full article, please visit
http://www.BetterVssRemoting.com
Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere
and VSS Remoting
This article makes a detailed comparison among SourceAnyWhere,
SourceOffSite, VSS Remoting and possible others.
|
by: Richard Bell |
last post by:
I have a class in a seperate dll which I want to remote. I have referenced
the class and registered it using a simple exe. I can connect to the class's
interface using Activator.GetObject and call it's methods. However, when I
use soapsuds to extract meta data, I get the following error:
Error: Unable to retrieve schema from url:
http://localhost:1234/RemoteObject.soap?WSDL, The remote server returned an
error: (500) Internal Server...
|
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()
|
by: Martijn Damen |
last post by:
Hi,
At the moment I am trying to develop an application that uses another app
over .net remoting and having some problems with it (ok, that is ofcourse
why I am here), hope somebody can shine a light on the following:
I have been given a sample winforms app, which works without problem, I can
connect, send queries and become response from the other application.
When I try to implement this in webforms, this unfortunately does not...
| |
by: Ron L |
last post by:
We are working on a distributed VB.Net application which will access a SQL
database located on a known server. Each client will run on the user's
local machine. To implement this, we are trying to use remoting for our
access to the SQL server, with the remoting being via IIS. Since all of our
users will have accounts in the destination domain, we want to have IIS
handle the security for us and not allow anonymous. We have set this up...
|
by: LGHummel |
last post by:
I'm trying to host a remoting app in IIS and am getting the following error:
Failed to execute the request because the ASP.NET process identity does not
have read permissions to the global assembly cache. Error: 0x80070005 Access
is denied.
I tried adding ASPNET to the Administrators group with no success.
The error is preceded by the following warning:
|
by: Sharon |
last post by:
Hi,
I'm using the remoting, and I have a remoting object that has a public event
that other processes should register to it.
But when the client process is registering to the remote event, it throw the
following exception:
System.Runtime.Serialization.SerializationException {“Cannot find the
assembly Tester, Version=1.0.2164.27180, Culture=neutral,
PublicKeyToken=null.”}
|
by: Kirk |
last post by:
I'm trying to use a Web Service to be a Remoting client of an existing
..NET 2.0 server. But I get the following error when I try to use
System.Runtime.Remoting.Channels.Http in my WebService. The same code
works fine in a standalone app. I have inspected
System.Runtime.Remoting.dll with ildasm, and I can see the
....Channels.Http namespace there. I verified that the virtual
directory is configured to use v2.0.50727 (the error message...
|
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 ;))
|
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,...
| |
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |