Web.config中没有远程显示错误甚至的customErrors ="关闭" (在Ubuntu /单声道) [英] Web.config isn't showing errors remotely even with customErrors="Off" (on ubuntu/mono)

查看:425
本文介绍了Web.config中没有远程显示错误甚至的customErrors ="关闭" (在Ubuntu /单声道)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的Web.config文件:

 <?XML版本=1.0&GT?;
<结构>
    <&的System.Web GT;
        <的customErrors模式=关/>
        <编译调试=真正的严=false的明确=真/>
        <网页和GT;
          <&命名空间GT;
            <清/>
            <添加命名空间=系统/>
            <添加命名空间=System.Collections中/>
            <添加命名空间=System.Collections.Generic/>
            <添加命名空间=System.Collections.Specialized/>
            <添加命名空间=System.Configuration/>
            <添加命名空间=System.Text/>
            <添加命名空间=System.Text.RegularEx pressions/>
            <添加命名空间=System.Web程序/>
            <添加命名空间=System.Web.Caching/>
            <添加命名空间=System.Web.SessionState/>
            <添加命名空间=System.Web.Security/>
            <添加命名空间=System.Web.Profile/>
            <添加命名空间=System.Web.UI程序/>
            <添加命名空间=System.Web.UI.WebControls/>
            <添加命名空间=System.Web.UI.WebControls.WebParts/>
            <添加命名空间=System.Web.UI.HtmlControls/>
          < /命名空间>
          <控制与GT;
            <加入SRC =〜/控制/ maleBed.ascx标签preFIX =显示myControl变量名=男/>
            <加入SRC =〜/控制/ femaleBed.ascx标签preFIX =显示myControl变量名=女/>
          < /控制>
        < /页>
    < /system.web>
< /结构>

即使设定为关闭(和它绝对是一个大写字母O)的customErrors模式,它仍然显示我的默认错误页,告诉我设置该属性之前,我可以远程看到实际的错误。

我没有machine.config文件,而我也设置这个模式的customErrors在Web.Debug.config和Web.Release.config =关。

任何想法吗?

非常感谢你。

编辑 - 什么它显示:

 在'/'Application Server的错误说明:服务器上出现应用程序错误。此应用程序prevent当前自定义错误设置的应用程序错误,远程查看(出于安全原因)的细节。它可以,但是,可以通过在本地服务器计算机上运行的浏览器查看。详细信息:若要使此特定错误信息的细节是对远程计算机上查看,请创建<&的customErrors GT;在位于当前Web应用程序根目录下的web.config配置文件中的标签。该<&的customErrors GT;那么标签应该有它的mode属性设置为Off。<! -  web.config配置文件 - ><结构>
    <&的System.Web GT;
        <的customErrors模式=关/>
    < /system.web>
< /结构>
注意:你所看到的当前错误页可以用自定义错误页替换通过修改应用程序的&LT的defaultRedirect属性;&的customErrors GT;配置标记以指向自定义错误页的URL。<! - web.config配置文件 - ><结构>
    <&的System.Web GT;
        <的customErrors模式=仅限远程的defaultRedirect =mycustompage.htm/>
    < /system.web>
< /结构>


解决方案

无法找到答案 - 我们必须让基于Windows的托管

Here is my Web.config file:

<?xml version="1.0"?>
<configuration>
    <system.web>
        <customErrors mode="Off" />    
        <compilation debug="true" strict="false" explicit="true />    
        <pages>
          <namespaces>
            <clear />
            <add namespace="System" />
            <add namespace="System.Collections" />
            <add namespace="System.Collections.Generic" />
            <add namespace="System.Collections.Specialized" />
            <add namespace="System.Configuration" />
            <add namespace="System.Text" />
            <add namespace="System.Text.RegularExpressions" />
            <add namespace="System.Web" />
            <add namespace="System.Web.Caching" />
            <add namespace="System.Web.SessionState" />
            <add namespace="System.Web.Security" />
            <add namespace="System.Web.Profile" />
            <add namespace="System.Web.UI" />
            <add namespace="System.Web.UI.WebControls" />
            <add namespace="System.Web.UI.WebControls.WebParts" />
            <add namespace="System.Web.UI.HtmlControls" />
          </namespaces>
          <controls>
            <add src ="~/controls/maleBed.ascx" tagPrefix ="mycontrol" tagName ="male"/>
            <add src ="~/controls/femaleBed.ascx" tagPrefix ="mycontrol" tagName ="female"/>
          </controls>
        </pages>
    </system.web>
</configuration>

Even with customErrors mode set to Off (and its definitely a capital "O") its still showing me the default errors page telling me to set this property before I can see that actual error remotely.

I don't have a machine.config file, and I've also set this customErrors mode="Off" in the Web.Debug.config and the Web.Release.config.

Any ideas anyone?

Thank you very much.

Edit - what its showing:

Server Error in '/' Application

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

解决方案

Couldn't find an answer - we had to get Windows based hosting.

这篇关于Web.config中没有远程显示错误甚至的customErrors =&QUOT;关闭&QUOT; (在Ubuntu /单声道)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆