您的位置:首页 > 其它

.Net Reomting 在WEB客户端里使用配置文件方法

2007-06-21 21:28 573 查看
前两天发了提了两个关于Reomting 在WEB项目里使用配置文件的问题,经过两天努力,终于把这个问题给解决了.现在我们来说说.
首先,还是建立一个配置文件app.config.代码如下:

<configuration>
<system.runtime.remoting>
<application>
<client>
<!--<wellknown type="HelloServer, General" url="http://localhost:8090/SayHello" />-->
<wellknown
mode="Singleton"
type="ClassLibrary3.HelloServer,ClassLibrary3" url="http://192.168.1.101/remoting/HelloServer.soap" />
</client>
<channels>
<channel ref="http" useDefaultCredentials="true" />
</channels>
</application>
</system.runtime.remoting>
</configuration>之后在Global.asax的Application_Start里加入如下代码:
RemotingConfiguration.Configure( @"C:\Inetpub\wwwroot\TestRepotigng\app.config" );
就OK了.
完整代码请参考我前面的文章
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐