a break in .net 2.0 remoting
2006-02-23 19:29
330 查看
Currently, we are converting our application to .net 2.0. Then I am getting an error with remoting... simply because Soap Serializer does not support serializing Generic Types...
and here is ms answer: " That is correct. We have decided not to invest in any significant new feature work for the SoapFormatter in Whidbey."
So what I have to do is changing our soap serializer formatter to binary serializer formatter using a config like this,
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 0;
props["TypeFilterLevel"] = "Full";
HttpChannel chan = new HttpChannel(props, clientProv, serverProv);
ChannelServices.RegisterChannel( chan );
But it is only part of the solution.. Unfortunately, I am using event call back, so it is working for client to submit the generic list data to serve. And when the server try to publish the data change to other subscribed event. "I am still getting a soapformatter not support error"
The original post in msdn forum with more codes are here
It seems no answer yet.. :(
and here is ms answer: " That is correct. We have decided not to invest in any significant new feature work for the SoapFormatter in Whidbey."
So what I have to do is changing our soap serializer formatter to binary serializer formatter using a config like this,
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 0;
props["TypeFilterLevel"] = "Full";
HttpChannel chan = new HttpChannel(props, clientProv, serverProv);
ChannelServices.RegisterChannel( chan );
But it is only part of the solution.. Unfortunately, I am using event call back, so it is working for client to submit the generic list data to serve. And when the server try to publish the data change to other subscribed event. "I am still getting a soapformatter not support error"
The original post in msdn forum with more codes are here
It seems no answer yet.. :(
相关文章推荐
- Basic Skill in .net2.0
- Personalization in ASP.NET 1.1(Help you understand Profile in ASP.NET 2.0)
- Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
- How to programmatically assign a SkinID to a control while using a master page in ASP.net 2.0
- How To: Use Role Manager in ASP.NET 2.0
- Asynchronous Pages in ASP.NET 2.0 (转载)
- start internal web server in .net 2.0
- Read ConnectionString from web.config in ASP.NET 2.0
- Keeping secrets in ASP.NET 2.0. [MSDN]
- Using ConnectionStrings in ASP.NET 2.0
- XSLT 2.0 in .NET
- [导入]using MySQL 5 with ObjectDataSources in ASP.NET 2.0
- TabStrip within ASP.NET 2.0 in C# with Design Time Support
- Configuration Model in .Net 2.0
- Speed Up Your Site with the Improved View State in ASP.NET 2.0
- The way of using SqlCacheDependency in .net 2.0
- Deleting Directory in ASP.net 2.0
- ASP.NET 2.0: Add build-in paging feature to repeater/为repeater添加内置分页功能
- Asynchronous Pages in ASP.NET 2.0
- ASP.NET 2.0: Add build-in paging feature to repeater/为repeater添加内置分页功能