473,385 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can i maintain ASP and ASP.NET Sessions on a same page?

2
Hi Guys,
I have a problem, i am migrating from existing asp web application to asp.net web application. The existing asp application holds user session variables. I can share those session variables between asp and asp.net applications by storing it in database, but my actual problem is after i logging in to asp app i redirect the page to asp.net web page. Now asp.net session is creating in application start...after a postback asp.net session expires!! asp session exists.
Is it possible to maintain asp and asp.net sessions on a same page with or without HTML frames?
Jan 29 '08 #1
3 1381
leoiser
41
ASP & ASP.NET can not maintain the same sessions.you can not access ASP page sessions in ASP.Net. One option is create a page that will pass all the session from ASP page to requested ASP.Net page & vice versa

For example you ve a ASP page, let it be page1.asp while clicking the button you need to goto page1.aspx Create a page PassASPSession.asp which will ve the code

string sSessions = "";
for(int i=0;i<Session.Count;i++)
{
sSessions = sSessions + "&" Session.Keys[i].ToString() + "=" + Session[i].ToString() );
}

redirect to the page you want to...
page = "GETASPXSession.aspx?" + sSessions.substring(1)

-----------------------------------------------
GETASPXSession.aspx

in this page assign all the values in session using querystring values & redirect to the corresponding aspx page


Hope u got the idea....
Jan 29 '08 #2
royson
2
I don't have a problem of transferring the session values between asp and asp.net applications because i am using database to save and access. My problem is i can able to create both asp session and asp.net session on a page with 2 html frames, but only asp session exists after a postback.
My question is can i maintain asp session and asp.net session on a same page which has asp page in one frame and asp.net page in another frame?
Jan 29 '08 #3
we are migrating one single asp page of an application to asp.net and have managed to maintain session between the pages by creating the new .net page under a new virtual directory in the existing website.

sorry - didn't read the last bit properly. virtual directory won't solve the problem in your case.
Feb 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ben | last post by:
Hi, I am running a simple application dedicated to verify the sessions variables, but it is not working. both transid and trackvars are enabled. testpage1: <?php session_start();...
0
by: Gleep | last post by:
Hey PHP Gurus, I have some complex scripts that work fine. I have a system where sessions are validated on every page of my application to keep them secure. Everything runs fine when I test and...
5
by: leegold2 | last post by:
Probably a newbie question about "state": My problem is I have a search form, so user enters a keyword <enter>, then this form posts to another page were the result are displayed. But this...
0
by: Mishu | last post by:
Does anyone know how to maintain the page setup options for pivot tables? Every time I reopen it, it defaults back to portrait, with 1" margins. I change it to landscape and save, but to no avail....
0
by: Vikram Sinha | last post by:
In the sessionstate element of web.config for your app, specify the mode as sqlserver. In addition to this, do the following: 1. Run InstallSqlState.sql (installed by default in...
5
by: Invalidlastname | last post by:
Hi, I just read the pattern "Design and Implementation Guidelines for Web Clients" from MSDN. Here is my question. In chapter 3,...
2
by: Hazzard | last post by:
What good ideas are out there now for a menu system, whether along the top of the page or the left side, which is event driven. ( I can do html frames but I am not looking for that. I would like...
42
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
2
by: ayush patel | last post by:
Hi, How can i retain the values of a aspx page when navigated to another page. say i have a page in which user entered the data but did not save. i send a java script message saying do you want to...
3
gregerly
by: gregerly | last post by:
Hello All, I'm working on a project right now that will require me to maintain a session on two separate secure domains. So user logs into domain a, and can quickly switch to domain b without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.