有一个项目我从 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>
在我本地是好用的(本地系统 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>
<%@ 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>
if(true)//测试
{
Response.Write("<script language='javascript'>javascript:window.open('"+ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9')</script>");
}
就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
现在是这种情况,我页面有个<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>");
}
就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
这也与框架支持有关吗???
现在是这种情况,我页面有个<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>");
}
就是说 我说的错误就是点击按钮后,打开一个新地址时报的错误!
不知道是什么错啊!!!!
那跟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吗?
ds.Tables[0].Rows[i]["url"].ToString ()+Aduser+"&flag=9"输出的内容是什么?
地址类似:http://35.1.1.10/jhAdress(虚拟地址)/default.aspx?loguser=加密串&flag=9
地址 涉及到保密方面,请多包涵啊!
地址类似:http://35.1.1.10/jhAdress(虚拟地址)/default.aspx?loguser=加密串&flag=9
以前是vs2003现在是vs2008,可能默认是vs2003的