Remoting Error
can not access property or method of proxy object on internet, works fine for LAN
Hello, here is my some remoting code
Code Snippet Remoted Class:
namespace Server
{
[Serializable()]
public class clsUser_Ent: MarshalByRefObj ect
{
public string _ID = "ID";
public clsUser_Ent()
{
}
public string ID()
{
return _ID ;
}
}
} Host:
namespace Host
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
try
{
IDictionary properties = new Hashtable();
BinaryServerFor matterSinkProvi der serverSinkProvi der = new BinaryServerFor matterSinkProvi der();
serverSinkProvi der.TypeFilterL evel = System.Runtime. Serialization.F ormatters.TypeF ilterLevel.Full ;
properties["name"] = "";
properties["port"] = 8070;
properties["typeFilterLeve l"] = "Full";
TcpServerChanne l tcpChannel = new TcpServerChanne l(properties, serverSinkProvi der);
ChannelServices .RegisterChanne l(tcpChannel, false);
RemotingConfigu ration.Register ActivatedServic eType(typeof(cl sUser_Ent));
}
catch (Exception exp)
{
MessageBox.Show (exp.Message.To String());
this.lstOutput. Items.Add("Unab led to load objects.");
}
}
}
} Client:
namespace Client
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
try
{
IDictionary properties = new Hashtable();
BinaryClientFor matterSinkProvi der clientSinkProvi der = new BinaryClientFor matterSinkProvi der();
properties["name"] = "";
properties["port"] = 8070;
properties["typeFilterLeve l"] = "Full";
TcpClientChanne l tcpChannel = new TcpClientChanne l(properties, clientSinkProvi der);
ChannelServices .RegisterChanne l(tcpChannel, false);
RemotingConfigu ration.Register ActivatedClient Type(typeof(cls User_Ent), "tcp://220.156.185.252 :8070");
RemotingConfigu ration.Register ActivatedClient Type(typeof(MyS erverClass), "tcp://220.156.185.252 :8070");
}
catch (Exception exp)
{
MessageBox.Show (exp.Message.To String());
this.lstOutput. Items.Add("Unab led to load objects.");
}
}
private void button3_Click(o bject sender, EventArgs e)
{
try
{
clsUser_Ent a = new clsUser_Ent();
MessageBox.Show ("Obect created, press ok to print it's ID");
MessageBox.Show (a._ID);
}
catch (Exception exp)
{
MessageBox.Show ("Error: " + exp.Message.ToS tring());
}
}
}
} Error:
when I press Button3 , it will create the remote object, but whenever I access it's method or property it raise error, "No connection could be made because the target machine actively refused it"
I checked it within LAN, it works fine but can't on internet
I already disable the firewall on both computer also.
waiting for good reply......
Regards
Vishal Simon
0 1046 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Fadi |
last post by:
Backround:
I am trying to figure out how to do the equivalant of a classic COM
Local Server Singleton in .NET/C#. I created a coupld of simple Class
Libs that exposes public interfaces and hosted them in a Windows Forms
EXE. Create a Windows Forms client and both the Client and the Host
EXEs configure the remoting protocols through respective .config
files.
Problem:
I want to change the host from an Win Forms EXE to a Windows Service.
|
by: perspolis |
last post by:
Hi
I want to send some info from my C# windows application to a website that
hosetd in Linux.
Can I use Remoting to transfer information between them?
thanks in advance
|
by: AMDRIT |
last post by:
Hello folks,
I appologize for the cross post, but I really need an answer on this:
I do not think that I am seeing the whole picture here. I would like to
create a windows service and a management console, using Visual Basic 2003.
The windows service part, I think, is easy enough. I am more concerned with
the remoting aspect of the project. Below is the general idea of my
approach, please correct my where I am wrong.
|
by: Milan |
last post by:
I've got a slight problem with an application I'm creating:
I am passing a client side Stream into server side method call (remoted
method call). The server side method call creates a BinaryReader around
the stream. When reading from the BinaryReader I get a
Remoting.Exception with the text "Permission Denied: Cannot call
non-public or static methods remotely".
Originally the application was created in .NET v1.1 but was migrated to...
|
by: mitch |
last post by:
Hello,
Basically, I want my application to run only one instance at a time and pass
command line arguments to a running instance. I have all of this working, I
used the IPC Remoting channel and my program handles the command line
arguments well. However, after my program has been running for a little while
(say 5-10 minutes) the command line arguments no longer are passed, and
instead it causes a .NET Remoting exception claiming to have...
| |
by: Michael Maes |
last post by:
Hi,
We have a windows service passing objects to a client application by
remoting.
The windows service is started and running successfully.
* When the client app is running on the same machine as the windows service
(W2K3) every method gets executed successfully.
* When the client app is running on a different machine (XP SP2), some
methods from the remote object the client calls make client hang. Other
|
by: Rich |
last post by:
Can anyone suggest a good (current) tutorial on how to do basic
remoting with C# (2005 express edition)?
|
by: José Joye |
last post by:
Hello,
What is the best way to stop a remoting server (Singleton SAO) that has been
started with RemotingConfiguration.Configure().
For sure, I want to do this without quitting the application :-)
In fact, at a given time based on an internal event, I would like to stop
the remoting functionality within my process.
Many thanks,
|
by: VishalSimon |
last post by:
Plese help,
I can not call the method after creating the remoted object in C#.Net
I do not know what is wrong with my code ?
This is the code:
Remotable Class:
|
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: 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...
| |
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 project—planning, coding, testing, and deployment—without 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: 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
|
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...
| |