会话变量问题 [英] Session variables issue

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

问题描述

大家好,



这个问题让我头疼,我已经秃了...... !!



确定即可,



1.在Windows 2008 Server上的IIS 7上托管的一个Web应用程序(.Net / C#) - 在端口A上运行 - 应用程序池:经典.NET池,仅Windows验证



2.另一个Web应用程序(经典ASP)托管在同一个IIS 7上 - 同一台服务器上的Windows 2008服务器上端口B - 应用程序池:默认应用程序池,匿名身份验证



用户登录到PORT A Web应用程序,应用程序识别用户(Windows登录)并建立会话用户的变量(.NET会话)。

此(端口A)Web应用程序上有一个链接,用户将用户重定向到端口B Web应用程序



当用户点击该链接时链接,请求登陆验证页面(ASP),验证用户对SQL服务器数据库,并建立会话变量(这次它将是ASP会话)并显示页面。



此ASP页面上将有一个链接,用于将用户带到.NET应用程序(已建立会话的位置)。当用户点击该链接时,我得到一个对象引用未设置错误(用于会话值提取)



这种情况​​发生在生产服务器上但不在测试服务器上(从代码的角度来看,它们至少是相同的)



请详细说明这个...



谢谢。



问候,

Hi all,

This issue of mine scratched my head and I am bald already..!!

OK coming to the point,

1. One web application (.Net/C#) hosted on IIS 7 on Windows 2008 Server - running on port A - Application pool: Classic .NET pool, windows authentication ONLY

2. Another web application (Classic ASP) hosted on the same IIS 7 - same server windows 2008 server on port B - application pool: Default application pool, anonymous authentication

The user logs on to PORT A web application, the application identifies the user (windows login) and establishes session variables (.NET sessions) for the user.
There is a link on this (port A) web application which redirects the user to port B web application

When the user clicks that link, the request lands on an authentication page (ASP) which validates the user against an SQL server database and the establishes the session variables (this time it will be ASP sessions) and displays the page.

There will be a link on this ASP page to take the user to .NET application (where the sessions are already established). When the user clicks on that link, I get an object reference not set error (for session value extraction)

This happens on the production server but not on the test server (assumably they are the same atleast from the code perspective)

Please shed some light on this...

Thanks.

Regards,

推荐答案

查看此代码项目关于单点登录的文章详情多个应用程序:



在ASP.NET中跨多个应用程序进行单点登录 [ ^ ]



希望它有所帮助。
Check this Code Project article details on Single Sign on to multiple applications:

Single sign-on across multiple applications in ASP.NET[^]

Hope it helps.


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

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