路过的兄弟姐妹麻烦在百忙之中看看
如题,情况是这样的,我在iis里面通过web.config配置服务,代码如下
<system.runtime.remoting>
<application>
<service>
<wellknown type="Services.DoSomething,Services" mode="Singleton" objectUri="Do.soap"></wellknown>
</service>
<channels>
<channel name="MyHttp" ref="http">
<serverProviders>
<provider ref="wsdl"/>
<formatter ref="binary" typeFileterLevel="Full"/>
<formatter ref="soap" typeFileterLevel="Full"/>
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
浏览正常
但是在client访问,就出错啦, 如图:
很郁闷的是,异常信息是"???", 我怀疑是服务器端的问题,但是在浏览器中访问又是正常的, 很奇怪,求高手指导!! 抱歉, 没有分数!
客户端配置发出来看看啊
另存为rar就行,这是全部代码, 谢谢!!!
client
static void Main(string[] args)
{
string url = "http://127.0.0.1:2000/Do";// "http://www.remoting.com/Do.soap?wsdl";
var ser = Activator.GetObject(typeof(IServices.IServices), url) as IServices.IServices;
ser.Say("xyz");
Console.ReadKey();
}
@天空海阔:
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" useDefaultCredentials="true" port="0">
<clientProviders>
<formatter ref="binary"/>
</clientProviders>
</channel>
</channels>
<client>
<wellknown url="http://www.remoting.com/Do.soap" type="Services.DoSomething,Services"/>
</client>
</application>
</system.runtime.remoting>