I have a remote object with a public property (see code below). A client
can use this property to receive a ref to another remote object and use it's
properties.
This works great over a LAN, but over the internet, when the client tries to
use this second object by calling a property or method, the call hangs for
about 30 seconds then throws the following exception:
"A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond"
When I create the initial connection to the remote service
(MyRemoteServic e), it communicates via the ip address and port I specified
in the URI passed to RemotingService s.Connect. But when I then retrieve a
ref to MyRemoteObject and call its methods, what ip address/port is used for
that network communication? I'm guessing it's using another port that is
not open thru a firewall.
---------code-------------------------------------
SERVER:
public class MyRemoteObject : MarshalByRefObj ect
{
public int MyProperty {
get { return 5; }
}
}
public class MyRemoteService : MarshalByRefObj ect
{
public MyRemoteObject RemoteObject {
get { return new MyRemoteObject( ); }
}
}
CLIENT:
public class MyClientApp {
public Run() {
MyRemoteService remSvc =
(MyRemoteServic e)RemotingServi ces.Connect(typ eof(MyRemoteSer vice),
String.Format(" tcp://{0}:{1}/MyRemoteService ", IPAddress, Port));
MyRemoteObject remObj = remSvc.RemoteOb ject;
int remProp = remObj.MyProper ty; //this hangs, then throws
exception
}
} 1 1676
I think something like this is happening: http://www.glacialcomponents.com/Art...ail/CAOMN.aspx
But please feel free to post more replies if you have any other ideas or
comments!
"Joel Lyons" <NO*********@NO VARAD.NET> wrote in message
news:eE******** ******@TK2MSFTN GP12.phx.gbl... I have a remote object with a public property (see code below). A client can use this property to receive a ref to another remote object and use it's properties. This works great over a LAN, but over the internet, when the client tries to use this second object by calling a property or method, the call hangs for about 30 seconds then throws the following exception: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
When I create the initial connection to the remote service (MyRemoteServic e), it communicates via the ip address and port I specified in the URI passed to RemotingService s.Connect. But when I then retrieve a ref to MyRemoteObject and call its methods, what ip address/port is used for that network communication? I'm guessing it's using another port that is not open thru a firewall.
---------code------------------------------------- SERVER: public class MyRemoteObject : MarshalByRefObj ect { public int MyProperty { get { return 5; } } }
public class MyRemoteService : MarshalByRefObj ect { public MyRemoteObject RemoteObject { get { return new MyRemoteObject( ); } } }
CLIENT: public class MyClientApp { public Run() { MyRemoteService remSvc = (MyRemoteServic e)RemotingServi ces.Connect(typ eof(MyRemoteSer vice), String.Format(" tcp://{0}:{1}/MyRemoteService ", IPAddress, Port)); MyRemoteObject remObj = remSvc.RemoteOb ject; int remProp = remObj.MyProper ty; //this hangs, then throws exception } }
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jaydeep |
last post by:
Hello,
I am facing a strange problem. Problem accessing remote database from
ASP using COM+ server application having VB components (ActiveX DLL)
installed.
Tier 1 : ASP front End (IIS 5.0)
Tire 2 : COM objects
Tier 3 : SQL Server 2000 DB
Flow is : ASP talks with COM objects and COM objects talks with DB
Scenario 1
|
by: Gijs Beukenoot |
last post by:
Hi all,
I have an existing application that checks a few things before it
launches another application. One thing that the application needs to
check is the subscription properties of both the local database and the
remote (LAN) server.
I've stumbled upon some properties but I am trying to fit in the last
ones and I can't seem to find the right code to accomplish this... Can
anyone shine a little light on this please ?
|
by: Peter Lorz |
last post by:
Hello,
I have a simple problem. I got two visual studio projects, one is an
application, the other a common windows service. The application needs
to get a remote reference of the service. Now the question: How do I
get the application-project known to the referenced classtype of the
remote object in the service-project ?
Thanx for any help!
|
by: Alek Davis |
last post by:
Hi,
Is it possible to access intrinsic ASP objects, such as Request, from a .NET
class. Say, I have a .NET library exposed via a COM or COM+ wrapper. Can
this library retrieve the request info (basically, server variables exposed
via the Request object), when it is invoked from a traditional ASP (not
ASP.NET) application? Any ideas? Thanks in advance.
Alek
|
by: Joergen Bech |
last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running
application on a web server outside of my control, but only the first
time I run it:
1. After a long period of inactivity (or updating the code-behind dll)
accessing any aspx page in the application causes the application
to run for the first time. Some of the initialization involves
reading and writing some text and xml files using simple streamreader
and streamwriter...
| |
by: Joel Lyons |
last post by:
I have a remote object with a public property (see code below). A client
can use this property to receive a ref to another remote object and use it's
properties.
This works great over a LAN, but over the internet, when the client tries to
use this second object by calling a property or method, the call hangs for
about 30 seconds then throws the following exception:
"A connection attempt failed because the connected party did not properly...
|
by: Fredric Ragnar |
last post by:
Hi,
I am making a prototype system with Remoting in the bottom of the system. An
XML Web Service is using the remote object on an IIS to present data.
I am using a TcpChannel for communicating between the XML Web Service and
the host for the remote object. Within the host a port is defined and the
channel registered. It starts listening for requests. The destination port is
therefore clearly defined.
|
by: Jay |
last post by:
I created a website in Visual studio 2005.
I did a build and I can browse it on my local box.
http://localhost/gpweb/gpkey.aspx
When I try to access it on a remote box, it doesn't work.
http://<myservername>/gpweb/gpkey.aspx
I get the "Page cannot be displayed" error.
|
by: Noy B |
last post by:
Hi,
I have developed a small application that is using a MSAccess DB.
the problem is that it was developed on a machine where the
application and the DB are both located.
now it needs to be change that the application will be able to run on
any other machine (using \\ syntax on the run command- not a problem)
using the DB located on a static-different machine.
for this purpose I need to create a Remote Connection from my
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |