如何把远程异常抛到客户端? 为什么要抛到客户端呢?是想让客户端看见么?什么叫做remoting? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 请参看帮助ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpgenref/html/gnconremotingsettingsschema.htmms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpgenref/html/gnconcustomerrorselement.htm在服务器的配置文件中加上<customErrors mode="Off" />加在</system.runtime.remoting>前面 <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> 配置文件添加: <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");} 调用dos的信使服务,把异常信息发过去,哈哈! to:kingkoo对方主机关闭了信使服务不就不行了吗. 对不起,在标题中没写清楚,我是要把“自定义”的异常抛到客户端,jim兄和LoveCherry兄的方法只能抛系统定义的异常。可能关键在于怎样序列化异常类,Excption类实现了ISerializable接口。我自己的异常类要怎样序列化呢? 有一个RemotingException可以从他继承 不论是从RemotingException 或者是 Exception 继承 都报:“未找到反序列化(异常类型)类型对象的构造函数。”这个序列化异常。 实现数据库读写的技术 用过advanced installer安装包制作工具的进来看一下 base target _blank 问题 maysql语句 如何在mdi窗体中运行其他程序 求教,关于winform中datagridview的checkbox列排序的问题 真正的《c#高级编程》中文第三版 请问,DataGrid的数据如何即时地传递到文本框中? ▲▲上帝救我,又是BUG!Datagrid选中一行后拖动滚动条出现cell的编辑框,微软那头猪▲▲ 一个关于类型映射的问题(Type) 如果快速得到一个软件的安装目录? 如何在程序窗口启动之后,自动隐藏。
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>前面
<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");
}
对方主机关闭了信使服务不就不行了吗.