日期:2014-05-17  浏览次数:20412 次

IIS部署报错 请教...急
有一个项目我从 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>
 

 

------解决方案--------------------
<customErrors mode="Off"/>设置为Off后能看到具体错误信息吗
------解决方案--------------------
是不是你的系统框架不支持iis7啊
------解决方案--------------------
iis7有集成模式和经典模式,选择经典模式试试
------解决方案--------------------
你建立个简单的页面测试,看是不是数据库连接的问题。
HTML code
<%@ 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>

------解决方案--------------------
肯定是IIS7配置问题!你看一下,具体错误信息!
------解决方案--------------------
<customErrors mode="Off"/>。。。。别设置成OFF。。。这样看不到错误
------解决方案--------------------
与你的框架支持有关
------解决方案--------------------
我也遇到过此类的错误,其实你好好看看你的代码调试一下,将<customErrors mode="Off"/>改成on,看看错误是在什么地方,然后修改下你的代码就可以了
------解决方案--------------------
打开一个新地址时报的错误?
那跟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>");
}
}