0

Hi can any1 explain this code to me? i dont qute understand.

strIPaddress is a ip address and strPort is the port number.

_objExtAccess=(IExtranetAccess)Activator.GetObject(
                typeof(IExtranetAccess),
                "tcp://"+strIPAddress+":"+strPort+"/ExtranetAccessService");

Thanks.

2
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by strRusty_gal
0

They are using Activator.GetObject to create an object of type IExtranetAccess, the description of which is at "tcp://"+strIPAddress+":"+strPort+"/ExtranetAccessService". Since Activator.GetObject returns an Object, they cast it into an IExtranetAccess object and assign it to _objExtAccess

0

Hi,

How do i access this url? i run the exe file.. but the error indicate that i cannot connect to extranet.

0

That means that you either don't have the ability to connect on that port (it's blocked, ip is blocked, etc.) or that there is no service running on that port to provide you the object.

0

If the strIPAddress is 'localhost'.. will it be able to connect???

strIPAddress

strIPAddress

0

Hi,

How do i vertify if there is service on the port running? i used netstat -a.. but cant find the port that indicate in the code. Is there alternative way i can vertify the port?

Thanks for the help =)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.