Thursday, March 29, 2012

Sharing Session State between ASP and ASP.NET

Hi, Our application have asp and .aspx pages, we need to redirect user from
asp page to .aspx page and vice-versa and want to share session state b/w as
p
and asp.net. This could be achieved by storing the session state in database
.
I have few quires on this.
1) What happen if asp session and asp.net session time out limit is
different ? for example asp session limit is 20 min. and asp.net session
limit is 30 min. if user is navigated from asp page to .aspx page and he is
on .aspx page more than 20 min and come back asp page. then what will happen
to asp session. I want understand what the mechinism behind this.
2) We have header and footer code written in .inc files and included in asp
pages. when user navigates from asp page to .aspx page. Can we use same
header and footer .inc files in .aspx page ? (Header.inc contains some serve
r
side written in classic asp style) or else we hv to create new header and
footer as user controls in .net for aspx pages.
Thanks in Advacne, Any help is apprecitated
Sachin SakiOn May 28, 12:31 pm, Sachin Saki
<SachinS...@.discussions.microsoft.com> wrote:
> Hi, Our application have asp and .aspx pages, we need to redirect user fro
m
> asp page to .aspx page and vice-versa and want to share session state b/w
asp
> and asp.net. This could be achieved by storing the session state in databa
se.
> I have few quires on this.
> 1) What happen if asp session and asp.net session time out limit is
> different ? for example asp session limit is 20 min. and asp.net session
> limit is 30 min. if user is navigated from asp page to .aspx page and he i
s
> on .aspx page more than 20 min and come back asp page. then what will happ
en
> to asp session. I want understand what the mechinism behind this.
It would depend on how SQL Server had been configured to delete
sessions.

> 2) We have header and footer code written in .inc files and included in as
p
> pages. when user navigates from asp page to .aspx page. Can we use same
> header and footer .inc files in .aspx page ? (Header.inc contains some ser
ver
> side written in classic asp style) or else we hv to create new header and
> footer as user controls in .net for aspx pages.
It wouldn't work because of server side code. But the classic server-
side #Includes directive are still working in ASP.NET
How to Share Session State Between Classic ASP and ASP.NET
http://msdn2.microsoft.com/en-us/library/aa479313.aspx
Thanks Alexey, The link that you gave I gone through but have not found the
satisfactory answers of the quires I have. Can you explain in detail. i gues
s
you understand my concern.
Thanks n Regards,
Sachin Saki
"Alexey Smirnov" wrote:

> On May 28, 12:31 pm, Sachin Saki
> <SachinS...@.discussions.microsoft.com> wrote:
> It would depend on how SQL Server had been configured to delete
> sessions.
>
> It wouldn't work because of server side code. But the classic server-
> side #Includes directive are still working in ASP.NET
> How to Share Session State Between Classic ASP and ASP.NET
> http://msdn2.microsoft.com/en-us/library/aa479313.aspx
>
On May 28, 1:46 pm, Sachin Saki <SachinS...@.discussions.microsoft.com>
wrote:
> Thanks Alexey, The link that you gave I gone through but have not found th
e
> satisfactory answers of the quires I have. Can you explain in detail. i gu
ess
> you understand my concern.
>
Apologies! I've misunderstood your first concern, sorry. But now I
have an idea. What about including an .asp include into ASP.NET (using
#Includes and an empty page <% %> ) I think it should keep the ASP-
session during the time when user is working on the ASP.NET part. Can
you try it?

0 comments:

Post a Comment