在C/S三层架构中如何使用Remoting技术?
Remoting服务端配置文件
?xml version= "1.0 " encoding= "utf-8 " ?>
<configuration>
<configSections>
<section name= "DbConfig " type= "DataAccess.ConfigurationHandler, DataAccess "/>
</configSections>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode= "Singleton " type= "LIMIS_Login.UserLogin,LIMIS_Login " objectUri= "UserLogin.Soap " />
</service>
<channels>
<channel ref= "tcp " port= "8000 "/>
<serverProviders>
<formatter ref= "binary " typeFilterLevel= "Low " />
</serverProviders>
</channels>
<lifetime leaseTime= "5S " sponsorShipTimeout= "1S " renewOnCallTime= "2S " leaseManagerPollTime= "2S " />
</application>
</system.runtime.remoting>
<DbConfig>
<Class name= "Data Source " value= "localhost "/>
<Class name= "Initial Catalog " value= "LIMIS "/>
<Class name= "Integrated Security " value= "True "/>
</DbConfig>
</configuration>
客户端配置文件
<configuration>
<configSections>
<section name= "system " type= "Host.ConfigureHandler, Host "/>
<section name= "Framework " type= "Host.ConfigureHandler, Host "/>
</configSections>
<system>
<Server location= "localhost " port= "8000 " />
</system>
<Framework>
<Class name= "ILIMIS_Login " location= "UserLogin.Soap " type= "ILIMIS_Login.IUserLogin,ILIMIS_Login "/>
</Framework>
</configuration>
我在使用以下代码激活的时候不能获得相应接口的类型,请高手指点指点,小弟现在做毕业设计,急啊!这个问题不解决,就做不了了。
public static object getInterface(string IName)
{
object returnObj;
try