R
Ricky Jones
Is there any way to unregister a ActivatedClientType?
thanks, Ricky Jones
thanks, Ricky Jones
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Newsgroups: microsoft.public.dotnet.general
From: (e-mail address removed) (Peter Huang [MSFT])
Organization: Microsoft
Date: Fri, 12 Sep 2003 08:25:03 GMT
Subject: Re: unregister ActivatedClientType
X-Tomcat-NG: microsoft.public.dotnet.general
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi Ricky,
I think you may try to use the CreateInstance method of Activator.
Here is my demo.
public static void Main()
{
ChannelServices.RegisterChannel(new TcpChannel());
HelloServiceClass service;
object[] url = {new UrlAttribute("tcp://localhost:8083/MyServer")};
try
{
//The line
will failed for the unavailable port.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null, u
rl);
}
catch(System.Reflection.TargetInvocationException e)
{
Console.WriteLine(e.ToString());
}
url[0] = new UrlAttribute("tcp://localhost:8082/MyServer");
//The line will succeed.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null, u
rl);
if(service == null)
{
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
Did this does the job for you?
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------PSubject: Re: unregister ActivatedClientType
Date: Thu, 11 Sep 2003 09:10:44 -0400
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.56
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108144
X-Tomcat-NG: microsoft.public.dotnet.general
Thanks, for responding,
I accept a servername from the user, then I register an ActivatedClientType
to connect to the server. If you are unable to connect to the server it will
allow the user to reenter the servername. At this point though you cannot
reregister the type to point to the new server location. I've started
looking into using the activator class, but that seems to only work for
wellknowclienttypes not activatedclienttypes.
I looked at the article you sent me, it seems as though that is if the
object is already created.
Also note I'm setting up the remoting configuration through code.
Thank You
Ricky Jones
H&A Scientific Inc.U
Peter Huang said:Hi Ricky,
I think you may try to use the CreateInstance method of Activator.
Here is my demo.
public static void Main()
{
ChannelServices.RegisterChannel(new TcpChannel());
HelloServiceClass service;
object[] url = {new UrlAttribute("tcp://localhost:8083/MyServer")};
try
{
//The line
will failed for the unavailable port.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,u
rl);
}
catch(System.Reflection.TargetInvocationException e)
{
Console.WriteLine(e.ToString());
}
url[0] = new UrlAttribute("tcp://localhost:8082/MyServer");
//The line will succeed.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,u
rl);
if(service == null)
{
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
Did this does the job for you?
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------Subject: Re: unregister ActivatedClientType
Date: Thu, 11 Sep 2003 09:10:44 -0400
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.56
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108144
X-Tomcat-NG: microsoft.public.dotnet.general
Thanks, for responding,
I accept a servername from the user, then I register an ActivatedClientType
to connect to the server. If you are unable to connect to the server it will
allow the user to reenter the servername. At this point though you cannot
reregister the type to point to the new server location. I've started
looking into using the activator class, but that seems to only work for
wellknowclienttypes not activatedclienttypes.
I looked at the article you sent me, it seems as though that is if the
object is already created.
Also note I'm setting up the remoting configuration through code.
Thank You
Ricky Jones
H&A Scientific Inc.
http://groups.google.com/groups?hl=zh-CN&lr=&ie=UTF-8&oe=UTF-8&threadm=u6aP
e
69hCHA.1392%40tkmsftngp12&rnum=2&prev=/groups%3Fhl%3Dzh-CN%26lr%3D%26ie%3DU
T
<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Fri, 12 Sep 2003 09:36:21 -0400
Lines: 162
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.44
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108275
X-Tomcat-NG: microsoft.public.dotnet.general
Thank you for your help
Looking at the Activator.CreateInstance in the MSDN library I was unable to
find any information on the call being used in that fashion
Is there anywhere else that I can find information on the
activationAttributes paramaters and what is allowed to be passed in.
Again thanks alot for your help.
Thanks,
Ricky Jones
uPeter Huang said:Hi Ricky,
I think you may try to use the CreateInstance method of Activator.
Here is my demo.
public static void Main()
{
ChannelServices.RegisterChannel(new TcpChannel());
HelloServiceClass service;
object[] url = {new UrlAttribute("tcp://localhost:8083/MyServer")};
try
{
//The line
will failed for the unavailable port.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,url);
}
catch(System.Reflection.TargetInvocationException e)
{
Console.WriteLine(e.ToString());
}
url[0] = new UrlAttribute("tcp://localhost:8082/MyServer");
//The line will succeed.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,rl);
if(service == null)
{
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
Did this does the job for you?
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
http://groups.google.com/groups?hl=zh-CN&lr=&ie=UTF-8&oe=UTF-8&threadm=u6a P
e
69hCHA.1392%40tkmsftngp12&rnum=2&prev=/groups%3Fhl%3Dzh-CN%26lr%3D%26ie%3D U
T
Peter Huang said:Hi Ricky,
The MSDN said,
An instance of a type can be created at a local or remote site. If the type
is created remotely, an activation attribute parameter specifies the URI of
the remote site. The call to create the instance might pass through
intermediary sites before it reaches the remote site. Other activation
attributes can modify the environment, or context, in which the call
operates at the remote and intermediary sites.
For more information, please check the link below.
Activator Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemactivatorclasstopic.asp
Activator.CreateInstance Method (Type, Object[], Object[])
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemactivatorclasscreateinstancetopic6.asp
Here is a link about Client Activation, you may have a look.
Client Activation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconclientactivation.asp
If you have any related question, please feel free to let me know.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Fri, 12 Sep 2003 09:36:21 -0400
Lines: 162
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.44
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108275
X-Tomcat-NG: microsoft.public.dotnet.general
Thank you for your help
Looking at the Activator.CreateInstance in the MSDN library I was unable to
find any information on the call being used in that fashion
Is there anywhere else that I can find information on the
activationAttributes paramaters and what is allowed to be passed in.
Again thanks alot for your help.
Thanks,
Ricky Jones
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,Peter Huang said:Hi Ricky,
I think you may try to use the CreateInstance method of Activator.
Here is my demo.
public static void Main()
{
ChannelServices.RegisterChannel(new TcpChannel());
HelloServiceClass service;
object[] url = {new UrlAttribute("tcp://localhost:8083/MyServer")};
try
{
//The line
will failed for the unavailable port.
service =
u(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null,rl);
}
catch(System.Reflection.TargetInvocationException e)
{
Console.WriteLine(e.ToString());
}
url[0] = new UrlAttribute("tcp://localhost:8082/MyServer");
//The line will succeed.
service =
url);
if(service == null)
{
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
Did this does the job for you?
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Ricky Jones" <[email protected]>
References: <#[email protected]>
<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Thu, 11 Sep 2003 09:10:44 -0400
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.56
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108144
X-Tomcat-NG: microsoft.public.dotnet.general
Thanks, for responding,
I accept a servername from the user, then I register an ActivatedClientType
to connect to the server. If you are unable to connect to the server it
will
allow the user to reenter the servername. At this point though you cannot
reregister the type to point to the new server location. I've started
looking into using the activator class, but that seems to only work for
wellknowclienttypes not activatedclienttypes.
I looked at the article you sent me, it seems as though that is if the
object is already created.
Also note I'm setting up the remoting configuration through code.
Thank You
Ricky Jones
H&A Scientific Inc.
Hi Ricky,
I do not think you can unregister an ActivatedClientTypeEntry after you
have registered it in the remoting config.
Can you tell me what you want to do?
Here is link, you may have a check and let me know if that is what you
want
to do.U69hCHA.1392%40tkmsftngp12&rnum=2&prev=/groups%3Fhl%3Dzh-CN%26lr%3D%26ie%3DT
F-8%26oe%3DUTF-8%26q%3DActivatedClientTypeEntry%2Band%2Bunregister
I look forward to hearing from you.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no
rights.
--------------------
From: "Ricky Jones" <[email protected]>
Subject: unregister ActivatedClientType
Date: Wed, 10 Sep 2003 11:06:47 -0400
Lines: 4
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.36
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:107959
X-Tomcat-NG: microsoft.public.dotnet.general
Is there any way to unregister a ActivatedClientType?
thanks, Ricky Jones
<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Mon, 15 Sep 2003 09:23:39 -0400
Lines: 246
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.57
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.general:108221
X-Tomcat-NG: microsoft.public.dotnet.general
Thank you for your help.
/Peter Huang said:Hi Ricky,
The MSDN said,
An instance of a type can be created at a local or remote site. If the type
is created remotely, an activation attribute parameter specifies the URI of
the remote site. The call to create the instance might pass through
intermediary sites before it reaches the remote site. Other activation
attributes can modify the environment, or context, in which the call
operates at the remote and intermediary sites.
For more information, please check the link below.
Activator Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemactivatorclasstopic.asp
Activator.CreateInstance Method (Type, Object[], Object[])
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/htmlmfrlrfsystemactivatorclasscreateinstancetopic6.asp
Here is a link about Client Activation, you may have a look.
Client Activation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htl/cpconclientactivation.asp
If you have any related question, please feel free to let me know.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Fri, 12 Sep 2003 09:36:21 -0400
Lines: 162
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.44
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108275
X-Tomcat-NG: microsoft.public.dotnet.general
Thank you for your help
Looking at the Activator.CreateInstance in the MSDN library I was unable to
find any information on the call being used in that fashion
Is there anywhere else that I can find information on the
activationAttributes paramaters and what is allowed to be passed in.
Again thanks alot for your help.
Thanks,
Ricky Jones
Hi Ricky,
I think you may try to use the CreateInstance method of Activator.
Here is my demo.
public static void Main()
{
ChannelServices.RegisterChannel(new TcpChannel());
HelloServiceClass service;
object[] url = {new UrlAttribute("tcp://localhost:8083/MyServer")};
try
{
//The line
will failed for the unavailable port.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null ,
url);
}
catch(System.Reflection.TargetInvocationException e)
{
Console.WriteLine(e.ToString());
}
url[0] = new UrlAttribute("tcp://localhost:8082/MyServer");
//The line will
succeed.
service =
(HelloServiceClass)Activator.CreateInstance(typeof(HelloServiceClass),null ,
url);
if(service == null)
{
Console.WriteLine("Could not locate server.");
return;
}
// Calls the remote method.
Console.WriteLine();
Console.WriteLine("Calling remote object");
Console.WriteLine(service.HelloMethod("Caveman"));
Console.WriteLine(service.HelloMethod("Spaceman"));
Console.WriteLine(service.HelloMethod("Client Man"));
Console.WriteLine("Finished remote object call");
Console.WriteLine();
}
Did this does the job for you?
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Ricky Jones" <[email protected]>
References: <#[email protected]>
<[email protected]>
Subject: Re: unregister ActivatedClientType
Date: Thu, 11 Sep 2003 09:10:44 -0400
Lines: 68
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.56
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108144
X-Tomcat-NG: microsoft.public.dotnet.general
Thanks, for responding,
I accept a servername from the user, then I register an
ActivatedClientType
to connect to the server. If you are unable to connect to the server it
will
allow the user to reenter the servername. At this point though you cannot
reregister the type to point to the new server location. I've started
looking into using the activator class, but that seems to only work for
wellknowclienttypes not activatedclienttypes.
I looked at the article you sent me, it seems as though that is if the
object is already created.
Also note I'm setting up the remoting configuration through code.
Thank You
Ricky Jones
H&A Scientific Inc.
Hi Ricky,
I do not think you can unregister an ActivatedClientTypeEntry after you
have registered it in the remoting config.
Can you tell me what you want to do?
Here is link, you may have a check and let me know if that is what you
want
to do.a
PD69hCHA.1392%40tkmsftngp12&rnum=2&prev=/groups%3Fhl%3Dzh-CN%26lr%3D%26ie%3
UT
F-8%26oe%3DUTF-8%26q%3DActivatedClientTypeEntry%2Band%2Bunregister
I look forward to hearing from you.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no
rights.
--------------------
From: "Ricky Jones" <[email protected]>
Subject: unregister ActivatedClientType
Date: Wed, 10 Sep 2003 11:06:47 -0400
Lines: 4
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: 207.14.226.36
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:107959
X-Tomcat-NG: microsoft.public.dotnet.general
Is there any way to unregister a ActivatedClientType?
thanks, Ricky Jones
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.