为什么要抛到客户端呢?是想让客户端看见么?什么叫做remoting?

解决方案 »

  1.   

    请参看帮助
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpgenref/html/gnconremotingsettingsschema.htm
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpgenref/html/gnconcustomerrorselement.htm在服务器的配置文件中加上
    <customErrors mode="Off" />加在</system.runtime.remoting>前面
      

  2.   

    <configuration><system.runtime.remoting><application><client url="http://computername:8080"><activated type="ClientActivatedType, RemoteType"/></client><channels><channel ref="http" port="0"><serverProviders> <formatter ref="soap" typeFilterLevel="Full"/><formatter ref="binary" typeFilterLevel="Full"/></serverProviders></channel></channels></application><customErrors mode="off"/></system.runtime.remoting></configuration>
      

  3.   

    配置文件添加:
        <customErrors mode="Off" defaultRedirect="errors.aspx">
          <error statusCode="500" redirect="errors.aspx"/>
          <error statusCode="404" redirect="errors.aspx"/>
          <error statusCode="403" redirect="errors.aspx"/>
        </customErrors>
    手动添加
    catch(Exception)
    {
        Response.Redirect("Errors.htm");
    }
      

  4.   

    调用dos的信使服务,把异常信息发过去,哈哈!
      

  5.   

    to:kingkoo
    对方主机关闭了信使服务不就不行了吗.
      

  6.   

    对不起,在标题中没写清楚,我是要把“自定义”的异常抛到客户端,jim兄和LoveCherry兄的方法只能抛系统定义的异常。可能关键在于怎样序列化异常类,Excption类实现了ISerializable接口。我自己的异常类要怎样序列化呢?
      

  7.   

    有一个RemotingException可以从他继承
      

  8.   

    不论是从RemotingException 或者是 Exception 继承 都报:“未找到反序列化(异常类型)类型对象的构造函数。”这个序列化异常。