会话变量丢失 [英] Session variables are lost

查看:58
本文介绍了会话变量丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好


我在Windows 2003上的iis 6.0服务器上的asp代码有问题

web。当我在我的网站上的asp页面之间重定向时,pageA与pageB不同的虚拟目录中的
会话变量值

丢失。我知道会话ID增加了。 (新会话)。

如果我在同一个虚拟目录中进行相同的调用,会话

变量不会丢失。关于不同的应用程序

池有什么用?如果是播种,我如何将两个或更多关于

的应用程序池加入会话变量?如果不是,那么没有编码工作。


N Dall

Hi All

I have a problem with my asp code on an iis 6.0 server on windows 2003
web. When I redirect between to asp pages on my web-site, where pageA is
in a different virtual directory from pageB the session variables value
a lost. I know that it is the session ID there increases. (New session).
If I make the same call in the same virtual directory the session
variables is not lost. Is it some thing about different application
pools? If sow, how can I join two or more application pools regarding
to session variables? If not is there a none coding work around.

N Dall

推荐答案

Nils Erik Dall写道:
Nils Erik Dall wrote:

大家好


我在Windows 2003上的iis 6.0服务器上的asp代码有问题

web。当我在我的网站上重定向到asp页面时,其中pageA

与pageB位于不同的虚拟目录中,会话变量

值丢失。我知道会话ID增加了。 (新

会话)。如果我在同一个虚拟目录中进行相同的调用

会话变量不会丢失。关于不同的

应用程序池有什么问题吗?
Hi All

I have a problem with my asp code on an iis 6.0 server on windows 2003
web. When I redirect between to asp pages on my web-site, where pageA
is in a different virtual directory from pageB the session variables
value a lost. I know that it is the session ID there increases. (New
session). If I make the same call in the same virtual directory
the session variables is not lost. Is it some thing about different
application pools?



排序。多个应用程序可以(通常也可以)使用相同的

应用程序池。


不同的虚拟目录也是不同的应用程序。在IIS管理器中查看

以查看此属性。


会话是特定于应用程序的。

Sort of. Multiple applications can (and usually do) use the same
application pool.

The different virtual directories are also different applications. Look
at their properties in IIS Manager to see this.

Sessions are application-specific.


如果播种,我如何加入两个或多个关于会话变量的应用程序

池?
If sow, how can I join two or more application
pools regarding to session variables?



我无法知道

There is no way that I know of


如果不是没有编码

解决。
If not is there a none coding
work around.



您需要创建自己的会话状态管理器,可能需要使用

数据库来存储每个用户的会话设置。


-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。

You will need to create your own session-state manager, perhaps using a
database to store session settings for each user.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


仔细检查这是否是同一个Web应用程序?如果您在每个vdir的根目录中定义了一个

应用程序,那么这是预期的,因为您在两个

不同的应用程序中...


-

Patrice


" Nils Erik Dall" < da ** @garudahr.comaécritdansle message de news:

ef *************** @ TK2MSFTNGP02.phx.gbl ...
Double check this is the same web application ? If you defined an
application at the root of each vdir this is expected as you are then in two
different applications...

--
Patrice

"Nils Erik Dall" <da**@garudahr.coma écrit dans le message de news:
ef***************@TK2MSFTNGP02.phx.gbl...

大家好


我在Windows 2003上的iis 6.0服务器上运行asp代码有问题

网站。当我在我的网站上的asp页面之间重定向,其中pageA在与pageB不同的虚拟目录中是
时,会话变量值为

丢失。我知道会话ID增加了。 (新会议)。如果

我在同一个虚拟目录中进行相同的调用,则会话变量

不会丢失。这是关于不同应用程序池的一些事情吗?如果播种,

如何加入两个或更多关于会话

变量的应用程序池?如果不是,那么没有编码工作。


N Dall
Hi All

I have a problem with my asp code on an iis 6.0 server on windows 2003
web. When I redirect between to asp pages on my web-site, where pageA is
in a different virtual directory from pageB the session variables value a
lost. I know that it is the session ID there increases. (New session). If
I make the same call in the same virtual directory the session variables
is not lost. Is it some thing about different application pools? If sow,
how can I join two or more application pools regarding to session
variables? If not is there a none coding work around.

N Dall



Patrice写道:
Patrice wrote:

仔细检查这是否是同一个Web应用程序?如果您在每个vdir的根目录中定义了一个

应用程序,那么这是预期的,因为您将使用两个不同的应用程序...
Double check this is the same web application ? If you defined an
application at the root of each vdir this is expected as you are then in two
different applications...



大家好


感谢您的回放。


提到的例子都在同一个网站内。

例如 http://webserver/testa/pagea.asp >>
http://webserver/testb/pageb.asp 会失去它的会话变量如果

?testa?是一个虚拟目录或/和?testb?是一个虚拟目录。


在示例中?testa?和?testb?在默认的应用程序池中。

我的问题是准确的。我能得到吗?testa?和?testb?使用

相同的会话变量作为网站?


N Dall

Hi all

Thanks for the replays.

The examples mention are inside the same website.
e.g. http://webserver/testa/pagea.asp >>
http://webserver/testb/pageb.asp will lose it?s session variable if
?testa? is a virtual directory or/and ?testb? is a virtual directory.

In the example ?testa? and ?testb? are in the default application pool.
My question is to be precise. Can I get ?testa? and ?testb? to use the
same session variable as the website?

N Dall


这篇关于会话变量丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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