小弟用C#。NET2005做的网络程序,在本地机器上运行,没有一点问题,但是一上传,只要一请求这个页面,就会立刻出现这中错误跪求达人指点,在线等......
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------运行时错误 
说明: 服务器上出现应用程序错误。此应用程序的当前自定义错误设置禁止远程查看应用程序错误的详细信息(出于安全原因)。但可以通过在本地服务器计算机上运行的浏览器查看。 详细信息: 若要使他人能够在远程计算机上查看此特定错误信息的详细信息,请在位于当前 Web 应用程序根目录下的“web.config”配置文件中创建一个 <customErrors> 标记。然后应将此 <customErrors> 标记的“mode”属性设置为“Off”。
<!-- Web.Config 配置文件 --><configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 注释: 通过修改应用程序的 <customErrors> 配置标记的“defaultRedirect”属性,使之指向自定义错误页的 URL,可以用自定义错误页替换所看到的当前错误页。
<!-- Web.Config 配置文件 --><configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 

解决方案 »

  1.   

    把 Web.Config 文件的 <customErrors>节点设置为
    <customErrors mode="Off"/>再把这个 Web.Config 文件上传到网上去。
    再查看一下产生的详细错误。
      

  2.   

    <customErrors mode="Off"/>这个设置可以看到具体的错误提示
    看了才知道具体是什么错误原因
      

  3.   

    设置webconfig文件里的
    <customErrors mode="Off"/>
    mode=Off,查看具体的错误代码
      

  4.   

    web.config的配置值都在这里了
    达人帮我分析一下
    <?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings/>
    <system.web>
    <!-- 
                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"/>
    <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
    <globalization 
                requestEncoding="gb2312" 
                responseEncoding="gb2312" 
       /> <authentication mode="Windows"/>
    <!--
                The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.        <customErrors mode="off" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm"/>
                <error statusCode="404" redirect="FileNotFound.htm"/>
            </customErrors>
            -->
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
      

  5.   

    同意楼上的。修改web.config可以看到错误堆栈和异常信息。该页面是否访问了服务器上不允许访问的资源,默认ASPNET权限下某些资源是不能访问的,比如:注册表,或者未授权的目录文件等?
      

  6.   

    ==》<customErrors mode="off" 
    这里是区分大小写的,请改成:<customErrors mode="Off"
      

  7.   

    恩,这个偶还是晓得的,这个语句是直接从浏览器的提示copy的,应该没问题的
      

  8.   

    把你的这一段
            <customErrors mode="off" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm"/>
                <error statusCode="404" redirect="FileNotFound.htm"/>
            </customErrors>
    先注释掉,这样应该可以出现错误提示.
      

  9.   

    “/”应用程序中的服务器错误。你在开发的时候是不是使用了 字符形式的 VirtualPath
    比如 
    Response.Redirect(@"/Myproject/a.aspx");
     可以改为
    Response.Redirect("a.aspx");

    Response.Redirect("/"+Request.ApplicationPath+"/a.aspx");
      

  10.   

    是用过virtualpath,但用的是你建议的那种

    protected void Button2_Click(object sender, EventArgs e)
    {
    if (txtUserName.Text == "******" && txtUserPwd.Text == "******" || txtUserName.Text == "******" && txtUserPwd.Text == "******")
    {
    Response.Redirect("resourceMan.aspx");
    }
    else
    {
    Response.Redirect("zhjy.aspx");
    }
    }
      

  11.   

    配置不对吧
    1。有没有把BIN放在根目录?
    2。Web.config有没有放在根目录?
      

  12.   

    楼主的web.config是对的,一般来说应该显示错误提示,可是没有出现,楼主应该确认一下是否和你上传的服务器的其他web.config冲突,或者你的web.config路径不对,没有起作用,而是服务器上一级的web.config起作用。
      

  13.   

    bin没有放在根目录
    没有生成BIN啊web.config是放在根目录下的
      

  14.   

    急切关注此问题,我正在为此问题而严重郁闷中我的用的vb.net 的,不过一样,原先的目录结构是  a/*.aspx  在本机上localhost/下没有任何问题传到服务器 目录结构是:  www.madomain.com/a/*.aspx 这样的结构应该对吧,web.config非得要在根目录下吗?不用吧,我在本地也试过不在根目录下啊