在asp.net中找不到资源问题 [英] The resource cannot be found issue in asp.net

查看:159
本文介绍了在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....

推荐答案

location.href属性 [
The URLUnencoded property[^] is a non-standard, Internet Explorer specific property. You cannot use it from any other browser. The location.href property[^] should return the value you need.


这篇关于在asp.net中找不到资源问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆