C# Remoting - How to turn off CustomErrors

跟風遠走 提交于 2019-11-30 08:08:13
Gulzar Nazim

For .Net 1.0/1.1 , you need a config file for remoting server

If you don't have a <ServerEXE>.config file, create one and have this in it:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <system.runtime.remoting>    
      <customErrors mode="off" />
   </system.runtime.remoting>
</configuration>

For .Net 2.0, you can use RemotingConfiguration.CustomErrorsMode property

sometimes

In the server file, use:

RemotingConfiguration.CustomErrorsEnabled(bool);
DOK

To turn off customErrors, open the web.config file on the server. If there is a customErrors tag, change it. If there isn't one, add it.

It should be <customErrors mode="Off"/> for this purpose.

If you are indeed using a custom error page, you will want to change this setting once you've found your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!