配置文件改为
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

解决方案 »

  1.   

    把 customErrors mode="RemoteOnly"
    设为 customErrors mode="Off" 看看错误是什么
      

  2.   

    把 customErrors mode="RemoteOnly"
    改为 customErrors mode="Off"
    允许调试信息
     <compilation 
             defaultLanguage="c#"
             debug="true"
        />编译程序使用Debug
      

  3.   

    按net_lover(【孟子E章】)的方法设置后出现:Object variable or With block variable not set
     
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Object variable or With block variable not setSource Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
    [COMException (0x800a005b): Object variable or With block variable not set]
       objWebPro.OWAccountingClass.SetAccountingInfo(OWAccountingRequest request) +0
       PayByPeriodResult.Page_Load(Object sender, EventArgs e) +1495
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 
      

  4.   

    Web.config 问题我刚刚也遇到这个问题了,用一个新的Web.config替换就没有问题了。我后来仔细对了对没有发现太大的差别。注意下面的权限问题    <authorization>
            <allow users="*" /> <!-- 允许所有用户 -->
                <!--  <allow     users="[逗号分隔的用户列表]"
                                 roles="[逗号分隔的角色列表]"/>
                      <deny      users="[逗号分隔的用户列表]"
                                 roles="[逗号分隔的角色列表]"/>
                -->
        </authorization>