有一个项目我从 vs2003 升级到 vs2008 
在我本地是好用的(本地系统 server 2003)但是部署在服务器上(server 2008 IIS 7 )后 就报错!!!
如下:Server Error in '/' Application.
--------------------------------------------------------------------------------Runtime Error 
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>
  

解决方案 »

  1.   

    难道是web.config需要配置什么东西吗?
      

  2.   

    <customErrors mode="Off"/>设置为Off后能看到具体错误信息吗
      

  3.   

    是不是你的系统框架不支持iis7啊
      

  4.   

    iis7有集成模式和经典模式,选择经典模式试试
      

  5.   

    你建立个简单的页面测试,看是不是数据库连接的问题。
    <%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">  protected void Page_Load(object sender, EventArgs e)
      {
        Response.Write("Hello !");
      }
    </script><html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
      

  6.   

    现在是这种情况,我页面有个<asp:Button id="btnTelphone" runat="server" Text="以此用户登录系统"></asp:Button>点击按钮后台:
    if(true)//测试
    {
       Response.Write("<script language='javascript'>javascript:window.open('"+ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9')</script>");
    }
    就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
      

  7.   

    肯定是IIS7配置问题!你看一下,具体错误信息!
      

  8.   

    <customErrors mode="Off"/>。别设置成OFF这样看不到错误
      

  9.   


    现在是这种情况,我页面有个<asp:Button id="btnTelphone" runat="server" Text="以此用户登录系统"></asp:Button>点击按钮后台:
    if(true)//测试
    {
      Response.Write("<script language='javascript'>javascript:window.open('"+ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9')</script>");
    }
    就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
    这也与框架支持有关吗???
      

  10.   

    我也遇到过此类的错误,其实你好好看看你的代码调试一下,将<customErrors mode="Off"/>改成on,看看错误是在什么地方,然后修改下你的代码就可以了
      

  11.   


    现在是这种情况,我页面有个<asp:Button id="btnTelphone" runat="server" Text="以此用户登录系统"></asp:Button>点击按钮后台:
    if(true)//测试
    {
      Response.Write("<script language='javascript'>javascript:window.open('"+ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9')</script>");
    }
    就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
    不知道是什么错啊!!!!
      

  12.   

    打开一个新地址时报的错误?
    那跟iis没有任何关系了
    你这样
    if(true)//测试
    {
     if(ds.Tables.Count>0 && ds.Tables[0].Rows.Count)
      Response.Write("<script>window.open('"+ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9')</script>");
    }
    }<script language='javascript'>javascript:window.open
    js没有这样的语法,你这是在哪学的?谁教你的?
      

  13.   

    你应当打印出
    Response.Write(ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9")
    看是一个正确的url吗?
      

  14.   

    我本地 iis 6上一点问题也没有!
      

  15.   

    那就是你的这个url有问题。
    ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9"输出的内容是什么?
      

  16.   

    难道是 iis 7设置问题吗?
      

  17.   

    地址 涉及到保密方面,请多包涵啊!
    地址类似:http://35.1.1.10/jhAdress(虚拟地址)/default.aspx?loguser=加密串&flag=9
      

  18.   


    地址 涉及到保密方面,请多包涵啊!
    地址类似:http://35.1.1.10/jhAdress(虚拟地址)/default.aspx?loguser=加密串&flag=9
      

  19.   

    可能是你asp.net的版本没选对吧
    以前是vs2003现在是vs2008,可能默认是vs2003的
      

  20.   

    解决了已经,dns问题 谢谢哈!!!