多级文件夹下页面Server.Transfe()调转问题

fedadfdsfsdfsd 2010-10-25 02:31:27
Global.asax全局文件应用中我添加了一个处理错误的代码。在同一级目录下的页面出错,跳转没有问题。
如果是二级目录或三级目录下的页面出错。跳转就有问题。
多级目录下,执行Server.Transfer("Error.aspx", false);跳转不过去

以下是全码:
void Application_Error(object sender, EventArgs e)
{
try
{

Exception exp = Server.GetLastError();
string strE = "内部错误:" + exp.InnerException.ToString() + "\r\n堆栈:" + exp.StackTrace + "\r " + "Message:" + exp.Message + "\r 来源:" + exp.Source;

// 在事件日志中记录异常信息
PF.BLL.SystemLog sl = new PF.BLL.SystemLog();
string strID =Convert.ToString(sl.Pro_Logs(strE));
Server.ClearError();
Application["a"] = exp.InnerException.Message.ToString();// exp.InnerException.ToString();
Application["b"] = exp.Message.ToString();
Application["c"] = strID;
Server.Transfer("Error.aspx", false);
}
catch
{

}
}
...全文
53 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2010-10-25
  • 打赏
  • 举报
回复
Server.Transfer("~/Error.aspx");
边城的刀声 2010-10-25
  • 打赏
  • 举报
回复
Server.Transfer("~/Error.aspx", false);
fedadfdsfsdfsd 2010-10-25
  • 打赏
  • 举报
回复
Server.Transfer()只能放虚礼路径
多级目录下,执行Server.Transfer("Error.aspx", false);跳转不过去
边城的刀声 2010-10-25
  • 打赏
  • 举报
回复
Server.Transfer("/Error.aspx", false)
不过最好还是在Web.config中配置吧
毕-设 业-计 (二零 届) 基于ZIGBEE技术的无线抄表系统的设计 所在学院 专业班级 电子信息工程 学生姓名 学号 指导教师 职称 完成日期 年 月 摘 要 IEEE 802.15.4/ZigBee协议是由IEEE 802.15.4标准的PHY和MAC层再加上ZigBee的网络和应用支持层所组成的,其突出的特点 是网络系统支持极低成本、易实现、可靠的数据传输、短距离操作、极低功耗、各层次 的安全性等。 在整个系统中,最核心的部分是CC2430芯片。CC2430结合了一个高性能2.4GHZ的射频 收发器核心和一颗工业级高效的8051控制器。这样的设计满足了以ZIGBEE协议为基础的 应用波段。所以在本次设计中就用了CC2430。 本次设计就是以CC2430芯片为核心,由电能采集电路;数据处理电路;无线收发模块 组成。他们的作用分别为:对电能信息做采集工作;对采集来的数据做初步处理;将初 步处理后的数据通过无线收发模块发送至基站。将能实现这些功能的模块合理的整合到 一个系统中,完成了本次设计的最终目标。 关键词:ZIGBEE 抄表 近距离传输 CC2430 Wireless meter reading system based on Zigbee Abstract IEEE802.15.4/ZIGBEE protocol including the standard by the IEEE802.15.4 PHY and MAC layer,ZIGBEE network andapplication layer.The characteristic is the low cost of the network system,easy to achieve,reliable data transmission,close operation,extremely low power consumption,safty and so on. Through the whole system,the core part is CC2430 chip.CC2430 including a high-performance 2.4GHZ RF transceiver and a industrial,efficiency 8051 controllers.This design meets the ZIGBEE protocol with band-based application.So use CC2430 chip in this system. The core of this system is CC2430.Be made of energy collection circuit,data processing circuit and wireless transceiver.The function of them are collect the energy information,deal with the collected data and sending data to base station through the wireless transceiver.Integrate these modules which can achieve the functions to a reasonable system,and completed the ultimate goal of this design. Keywords: ZIGBEE Meter Reading Close transfe CC2430 目录 1 绪论 6 1.1课题的来源 6 1.2课题的意义 6 1.3 ZIGBEE技术国内外发展现状 6 1.4 课题研究的主要内容 9 2设备方案设计与总体设计 10 2.1无线抄表系统的方案设计 10 2.2方案评价 12 3模块的设计连接和代码编写 14 3.1 IEEE802.15.4/ZIGBEE协议标准概述 14 3.2 电能数据采集模块 14 3.3 无线网络节点模块 14 3.3.1 CC2430器件模块 16 3.3.2 无线收发模块的工作原 17 3.3.3 无线收发模块 18 3.3.4 PIC18LF4620器件模块 19 3.4 ZIGBEE无线网络节点的软件设计 19 3.4.1 ZIGBEE协议栈 20 3.4.2 ZIGBEE信道分配 20 3.4.3网络的建立与加入 20 3.4.4数据的发送与接收 20 3.4.5 RFD节点软件设计流程 21 3.5 功能说明 22 4设计说明 23 4.1 协议选用说明 23 4.3 元器件选用说明 23 结论 24 致谢 26

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧