宿主机用的是IIS做的,在客户端象如下那样写,就能够访问

.Net Reomting 客户端配置文件不能访问
.Net Reomting 客户端配置文件不能访问            HelloServer obj2 
= (HelloServer)Activator.GetObject(
.Net Reomting 客户端配置文件不能访问                
typeof(ClassLibrary3.HelloServer),
.Net Reomting 客户端配置文件不能访问                
"http://192.168.1.101/remoting/HelloServer.soap");
.Net Reomting 客户端配置文件不能访问            
this.TextBox2.Text = obj2.HelloMethod(this.TextBox1.Text);
但是客户端换成:
.Net Reomting 客户端配置文件不能访问 HelloServer obj2=new HelloServer();
.Net Reomting 客户端配置文件不能访问 
.Net Reomting 客户端配置文件不能访问            
this.TextBox2.Text = obj2.HelloMethod(this.TextBox1.Text);
在Web.config里加入如下,确不能正确访问宿主机:
.Net Reomting 客户端配置文件不能访问   <system.runtime.remoting>
.Net Reomting 客户端配置文件不能访问      
<application>
.Net Reomting 客户端配置文件不能访问          
<client>
.Net Reomting 客户端配置文件不能访问        
<!--<wellknown type="HelloServer, General" url="http://localhost:8090/SayHello" />-->
.Net Reomting 客户端配置文件不能访问        
<wellknown
.Net Reomting 客户端配置文件不能访问       mode
="Singleton" 
.Net Reomting 客户端配置文件不能访问         type
="ClassLibrary3.HelloServer,ClassLibrary3" url="http://192.168.1.101/remoting/HelloServer.soap" />
.Net Reomting 客户端配置文件不能访问      
</client>
.Net Reomting 客户端配置文件不能访问         
<channels>
.Net Reomting 客户端配置文件不能访问            
<channel ref="http" useDefaultCredentials="true" />
.Net Reomting 客户端配置文件不能访问         
</channels>
.Net Reomting 客户端配置文件不能访问      
</application>
.Net Reomting 客户端配置文件不能访问   
</system.runtime.remoting>
请大家指教下

相关文章:

  • 2021-11-15
  • 2021-09-20
  • 2021-12-14
  • 2021-12-19
  • 2021-05-22
  • 2021-07-07
  • 2022-12-23
  • 2021-06-11
猜你喜欢
  • 2021-08-13
  • 2021-09-11
  • 2021-08-21
  • 2021-08-30
  • 2021-11-20
  • 2022-01-17
  • 2021-07-05
相关资源
相似解决方案