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>");
}
}
<script language='javascript'>javascript:window.open
js没有这样的语法,你这是在哪学的?谁教你的?
[解决办法]
你应当打印出
Response.Write(ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9")
看是一个正确的url吗?
[解决办法]
那就是你的这个url有问题。
ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9"
输出的内容是什么?
[解决办法]
重新打开一个浏览器,用这个地址 是好用的啊!?
你确认是一样的地址??
[解决办法]
让你贴出来输出结果
[解决办法]
这样的地址是不会出错的,应该是你的代码的问题,你可以先注释掉一些代码测试。
[解决办法]
文件夹的权限问题,修改一下网站所在文件的权限