[ADVANCED-DOTNET] Questions about changing the default typeFilterLevel setting

2003-11-27 Thread Raymond
Hellow everyone,

In one of my apps, I have to change the default typeFilterLevel setting
from "Low" to "Full" (The typeFilterLevel is a property of
BinaryServerFormatterSinkProvider which control the automatic
deserialization level.).  When I host my buiseness type with a server
program, I use following code to do that and it can work.

BinaryServerFormatterSinkProvider provider = new
BinaryServerFormatterSinkProvider();
provider.TypeFilterLevel = TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 9000;
TcpChannel chan = new TcpChannel(props, null, provider);
ChannelServices.RegisterChannel(chan);
RemotingConfiguration.RegisterWellKnownServiceType
(Type.GetType
("Etone.RegistBiz.RegistTx,RegistBiz"),
"RegistTrans",
WellKnownObjectMode.SingleCall);
RemotingConfiguration.RegisterWellKnownServiceType
(Type.GetType
("Etone.RegistBiz.RegistQry,RegistBiz"),
"RegistQuery",
WellKnownObjectMode.Singleton);
..

the question one is why following configuration file can't work to do the
same thing?



  
 
   
  
  
 
 
 
 
  

 

  


the question two is, when I host the class with IIS, I can not do that by
code or configuration. the Web.config file is as:



 
  
   

   
  
  
  
  
  
  
  
 



 


   
   


 

   
  
  
   
  
  
   

   
  




the Global.asax page file is as:

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Runtime.Remoting" %>
<%@ Import Namespace="System.Runtime.Remoting.Channels" %>
<%@ Import Namespace="System.Runtime.Remoting.Channels.Http" %>
<%@ Import Namespace="System.Runtime.Serialization.Formatters" %>
<%@ Import Namespace="Etone.RegistBiz" %>
<%@ Assembly Name="System.Runtime.Remoting" %>


void Application_Start()
{
 //Regist remoting class by code
 BinaryServerFormatterSinkProvider provider = new
BinaryServerFormatterSinkProvider();
 provider.TypeFilterLevel = TypeFilterLevel.Full;
 IDictionary props = new Hashtable();
 props["name"] = "MyChannel";
 props["priority"] = "100";
 HttpChannel chan = new HttpChannel(props, null, provider);
 ChannelServices.RegisterChannel(chan);
 RemotingConfiguration.RegisterWellKnownServiceType
  (Type.GetType("Etone.RegistBiz.RegistTx,RegistBiz"),
  "RegistTrans.rem", WellKnownObjectMode.SingleCall);
 RemotingConfiguration.RegisterWellKnownServiceType
  (Type.GetType("Etone.RegistBiz.RegistQry,RegistBiz"),
  "RegistQuery.rem", WellKnownObjectMode.Singleton);
}


the Machine.config file is not modified. who can point out the errores in
my code and configuration file or explain the reasones for me?

Thanks in advance!


Raymond
Software Engineer
Etone network tech limited.

===
This list is hosted by DevelopMentorĀ®  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com


Re: [ADVANCED-DOTNET] Questions about changing the default typeFi lterLevel setting

2003-11-29 Thread Raymond
Hi Ryan,

Thanks for your suggestion. I tried but it still can not work.

Regards,

Raymond

===
This list is hosted by DevelopMentorĀ®  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com


Re: [ADVANCED-DOTNET] Questions about changing the default typeFi lterLevel setting

2003-12-05 Thread Raymond
Hi Ryan,

Thank you very much. I tried again and the config can work in
appname.exe.config file, but can't insert these lines in Web.config file
when I want to host the services with IIS. I found that in Web.config file,
a  node can not include a  property, no matter
the  node is a template or an instance. Could you explain it for
me?

Anyway, you have helped me a lot. I wish you have a merry Christmas season
and a happy new year!

Raymond

===
This list is hosted by DevelopMentorĀ®  http://www.develop.com
Some .NET courses you may be interested in:

Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

Guerrilla .NET, 8 Dec 2003, in Los Angeles
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com