代码之家  ›  专栏  ›  技术社区  ›  Surya sasidhar

运行时错误?这个<customErrors>标签的“mode”属性应该设置为“Off”?

  •  0
  • Surya sasidhar  · 技术社区  · 15 年前

    这是我的web.config文件代码

    <httpRuntime executionTimeout="200000" maxRequestLength="300000"/>
    <customErrors mode="Off"></customErrors>
    <pages enableViewStateMac="false" enableEventValidation="false"  >
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </controls>
    </pages>
    <!--
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
    -->
    <compilation debug="true" >
      <assemblies>
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    
    </httpModules>
    

    你能帮帮我吗。我放置了全部web.config代码,但现在它显示了全部

    2 回复  |  直到 15 年前
        1
  •  5
  •   Flipster    15 年前
    <customErrors mode="Off"></customErrors>
    

    应该在里面

    <system.web>
    
    ...
    
    </system.web>
    

    同时,确保 (不是web.config)没有此行(调试时):

    <deployment retail="true" />
    

    如果是,这将覆盖 web.config配置 自定义错误设置。把这一行改进去 机器配置 致:

    <deployment retail="false" />
    
        2
  •  0
  •   Shoban    15 年前

    有关的详细信息 customError 在这里

    http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx

    推荐文章