在asp.net中找不到资源问题 [英] The resource cannot be found issue in asp.net
问题描述
我正在查看一个Asp.net项目文件.
当会话过期或会话变量为null或空时,它们将导航到htm页面,如下所示
I was going through an Asp.net project file.
In that they are navigating to a htm page when session got expired or session variable is null or empty like this
if (Session["UserID"] == null)
{
Response.Redirect("Expired.htm");
}
在那个htm中.在onload函数中,下面的一段javascript
in that htm. in onload function following piece of javascript is there
function SessionExp()
{
if(window.parent.length > 0)
{
window.parent.location.replace(document.URLUnencoded);
}
}
我的疑问是 window.parent.length , document.URLUnencoded 是什么意思,有时是document.URLUnencoded是什么意思? >
而且,如果我在两个浏览器选项卡中打开此网站并从一个选项卡中注销,然后单击第二个选项卡上的任何页面,则没有导航到Expired.htm,而是显示错误消息
>找不到资源.
>说明:HTTP404.您正在寻找的资源(或其依赖项之一)可能已被删除,名称更改或暂时不可用.请查看以下URL,并确保其拼写正确.
要求的网址:/website1/folder1/undefined
不确定如何出现?
注意:使用的是iframe.
任何人都可以对此进行解释....
My doubt is that what is window.parent.length,document.URLUnencoded means and sometimes document.URLUnencoded reurns Nan, what is the meaning of that one?.
And if i open this website in two browser tabs and logout from one tab,and i clicked on any page on the second tab, instead of navigating to Expired.htm it is showing error message
> The resource cannot be found.
> Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /website1/folder1/undefined
how undefined came??
Note: Iframes are used.
Anyone Pls explain this....
推荐答案
^ ]是Internet Explorer特定的非标准属性.您不能从任何其他浏览器使用它. location.href
属性 [
TheURLUnencoded
property[^] is a non-standard, Internet Explorer specific property. You cannot use it from any other browser. Thelocation.href
property[^] should return the value you need.
这篇关于在asp.net中找不到资源问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!