Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of
the application we manage session timeouts without the user knowing anything
about it by ensuring all the essential objects ( only a few ) are in place
during session start.
For performance, there are some parts of the application which use static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session in
some way to prevent the failure message being sent back to the client. ?
2.) If not possible, what is suggested as the best pattern to adpopt in this
scenario.
Thanks 7 7814
async postbacks will not keep session alive unless you are using
cookieless sessions. if you are using cookie based sessions (the
default), then the timeout is in the cookie. ajax calls can not update
this cookie in the browser. as the session timeout logic requires
sending a new cookie and getting back on redirect, the ajax calls fail
to do this.
you could switch to sessionless for ajax calls (good performance idea)
or go to cookieless sessions
if you can handle session loss on a page requests, but not ajax, you
could turn off auto redirect logic in XmlHttpRequest, and handle the
cookie logic in javascript. you would to modify the ms ajx library code
to do this.
-- bruce (sqlwork.com)
Microsoft Newsserver wrote:
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of
the application we manage session timeouts without the user knowing anything
about it by ensuring all the essential objects ( only a few ) are in place
during session start.
For performance, there are some parts of the application which use static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session in
some way to prevent the failure message being sent back to the client. ?
2.) If not possible, what is suggested as the best pattern to adpopt in this
scenario.
Thanks
We are not using cookiless sessions, although the sessions are not being
kept alive when an asynchronouse call from the ajax framework associated
with various panels is issued, the page cycle happens and the new session is
started. This is why my dummy button will create a new session invisibly to
the user ( apart from the ajax progress indicator ).
In my scenario, because I am also calling page methods which dont have
anything to do with the page requests, this simply fails. The challenge is
how to make this invisible.
Although I havent tried this thinking about it, I assume that the code never
gets called at all when the session has timed out and the failure results so
I would have to do one of the following things.
1.) Prejudge if the session has expired then establish it with a page
request using an async postback, after which I then issue my ajax request to
the static methods.
Or.
2.) Hold the parameters of the last call, make the page request and re-issue
the request.
Akward really.
"bruce barker" <no****@nospam.comwrote in message
news:ed**************@TK2MSFTNGP04.phx.gbl...
async postbacks will not keep session alive unless you are using
cookieless sessions. if you are using cookie based sessions (the default),
then the timeout is in the cookie. ajax calls can not update this cookie
in the browser. as the session timeout logic requires sending a new cookie
and getting back on redirect, the ajax calls fail to do this.
you could switch to sessionless for ajax calls (good performance idea) or
go to cookieless sessions
if you can handle session loss on a page requests, but not ajax, you could
turn off auto redirect logic in XmlHttpRequest, and handle the cookie
logic in javascript. you would to modify the ms ajx library code to do
this.
-- bruce (sqlwork.com)
Microsoft Newsserver wrote:
>Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of the application we manage session timeouts without the user knowing anything about it by ensuring all the essential objects ( only a few ) are in place during session start.
For performance, there are some parts of the application which use static page web methods to return xml to the page generally for popups which require rapid response. This works very well untill the session times out and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does an asynchronous postback that has no effect other than to reestablish the session and pops up an alert to the user indication that they should retry as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session in some way to prevent the failure message being sent back to the client. ?
2.) If not possible, what is suggested as the best pattern to adpopt in this scenario.
Thanks
when session times either on the server, or because the cookie expired and is
not passed, then the session logic creates a new session, creates a cookie,
and sends redirects back to itself. in the normal case the browser will send
back the new cookie, the session is loaded, and the page request is
processed. with an ajax call, the redirect is honored but the cookie is not
send. the session logic then knows that the browser is not honoring the
cookie, and thows an error, as there is no way to honor the session request.
if you don't need session to process the ajax calls (always a good design),
switch to ajax (json) webservices instead of page methods and disable session
on the webservices.
-- bruce (sqlwork.com)
"Microsoft Newsserver" wrote:
We are not using cookiless sessions, although the sessions are not being
kept alive when an asynchronouse call from the ajax framework associated
with various panels is issued, the page cycle happens and the new session is
started. This is why my dummy button will create a new session invisibly to
the user ( apart from the ajax progress indicator ).
In my scenario, because I am also calling page methods which dont have
anything to do with the page requests, this simply fails. The challenge is
how to make this invisible.
Although I havent tried this thinking about it, I assume that the code never
gets called at all when the session has timed out and the failure results so
I would have to do one of the following things.
1.) Prejudge if the session has expired then establish it with a page
request using an async postback, after which I then issue my ajax request to
the static methods.
Or.
2.) Hold the parameters of the last call, make the page request and re-issue
the request.
Akward really.
"bruce barker" <no****@nospam.comwrote in message
news:ed**************@TK2MSFTNGP04.phx.gbl...
async postbacks will not keep session alive unless you are using
cookieless sessions. if you are using cookie based sessions (the default),
then the timeout is in the cookie. ajax calls can not update this cookie
in the browser. as the session timeout logic requires sending a new cookie
and getting back on redirect, the ajax calls fail to do this.
you could switch to sessionless for ajax calls (good performance idea) or
go to cookieless sessions
if you can handle session loss on a page requests, but not ajax, you could
turn off auto redirect logic in XmlHttpRequest, and handle the cookie
logic in javascript. you would to modify the ms ajx library code to do
this.
-- bruce (sqlwork.com)
Microsoft Newsserver wrote:
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of
the application we manage session timeouts without the user knowing
anything about it by ensuring all the essential objects ( only a few )
are in place during session start.
For performance, there are some parts of the application which use static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does
an asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should
retry as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session
in some way to prevent the failure message being sent back to the client.
?
2.) If not possible, what is suggested as the best pattern to adpopt in
this scenario.
Thanks
You can add EnableSession = true to your WebMethods. to keep Session alive.
[System.Web.Services.WebMethod(EnableSession = true)]
public static object Fetch()
{
.....
}
Or if you want you can use following technique http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Microsoft Newsserver" <me@nowhere.comwrote in message
news:Oe**************@TK2MSFTNGP05.phx.gbl...
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of
the application we manage session timeouts without the user knowing
anything about it by ensuring all the essential objects ( only a few )
are in place during session start.
For performance, there are some parts of the application which use static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session in
some way to prevent the failure message being sent back to the client. ?
2.) If not possible, what is suggested as the best pattern to adpopt in
this scenario.
Thanks
while the second method will work, the first will not unless you are using
cookieless sessions.
-- bruce (sqlwork.com)
"George" wrote:
You can add EnableSession = true to your WebMethods. to keep Session alive.
[System.Web.Services.WebMethod(EnableSession = true)]
public static object Fetch()
{
.....
}
Or if you want you can use following technique http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Microsoft Newsserver" <me@nowhere.comwrote in message
news:Oe**************@TK2MSFTNGP05.phx.gbl...
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most of
the application we manage session timeouts without the user knowing
anything about it by ensuring all the essential objects ( only a few )
are in place during session start.
For performance, there are some parts of the application which use static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session in
some way to prevent the failure message being sent back to the client. ?
2.) If not possible, what is suggested as the best pattern to adpopt in
this scenario.
Thanks
Not sure what do you mean...
Are you saying that 20 minutes expiration will not be reset for Session if
the browser hit WebMethod with EnabledSession = true?
George.
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:E4**********************************@microsof t.com...
while the second method will work, the first will not unless you are using
cookieless sessions.
-- bruce (sqlwork.com)
"George" wrote:
>You can add EnableSession = true to your WebMethods. to keep Session alive.
[System.Web.Services.WebMethod(EnableSession = true)] public static object Fetch() { ..... }
Or if you want you can use following technique http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Microsoft Newsserver" <me@nowhere.comwrote in message news:Oe**************@TK2MSFTNGP05.phx.gbl...
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most
of
the application we manage session timeouts without the user knowing
anything about it by ensuring all the essential objects ( only a few )
are in place during session start.
For performance, there are some parts of the application which use
static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times
out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does
an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should
retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session
in
some way to prevent the failure message being sent back to the client.
?
2.) If not possible, what is suggested as the best pattern to adpopt in
this scenario.
Thanks
Ahhh....
OK. Thats good. I am not using cookiless sessions. So at least I know that
this will keep the session going. It wont help if it expires though ( or
will it ? )
Ill try
"bruce barker" <br*********@discussions.microsoft.comwrote in message
news:E4**********************************@microsof t.com...
while the second method will work, the first will not unless you are using
cookieless sessions.
-- bruce (sqlwork.com)
"George" wrote:
>You can add EnableSession = true to your WebMethods. to keep Session alive.
[System.Web.Services.WebMethod(EnableSession = true)] public static object Fetch() { ..... }
Or if you want you can use following technique http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Microsoft Newsserver" <me@nowhere.comwrote in message news:Oe**************@TK2MSFTNGP05.phx.gbl...
Hi Folks.
I have an issue I need some help with if thats OK.
I am running Framework 2.0 using Windows Integrated Security. For most
of
the application we manage session timeouts without the user knowing
anything about it by ensuring all the essential objects ( only a few )
are in place during session start.
For performance, there are some parts of the application which use
static
page web methods to return xml to the page generally for popups which
require rapid response. This works very well untill the session times
out
and the failure method is used on the callback.
Now, my quick fix for this was to set up an invisible button which does
an
asynchronous postback that has no effect other than to reestablish the
session and pops up an alert to the user indication that they should
retry
as the session has timed out. So my questions regarding this are.
1.) Can I intercept the server side process and reestablish the session
in
some way to prevent the failure message being sent back to the client.
?
2.) If not possible, what is suggested as the best pattern to adpopt in
this scenario.
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: cb |
last post by:
When a Session timeout occurs, I get a 403 - Forbidden. The address bar
contains the path that I was intending to go to but couldn't because of the
timeout.
How can I redirect the page when a...
|
by: Chakra Venkatesan |
last post by:
Hi,
My application has a session timeout of 15 mins.
I have a page for which I have disabled the session
state. If I invoke the this page from a new browser
session, there is no session created...
|
by: francois |
last post by:
Hi,
I would like to redirect the user to the login page after the session time
out.
I tried to do a trick in the global.aspx.cs
protected void Application_BeginRequest(Object sender,...
|
by: Eilsa |
last post by:
Dear all,
My ASP.NET page always session timeout within 20 minutes. However, I've set
the following statement at the web.config
<sessionState timeout="400" />
Any alternative solution to...
|
by: Joe Abou Jaoude |
last post by:
hi,
I have a web app with forms authentication and a timeout session of 20
mins for security reasons. I recently added a feature that allows users
(if they want to) to automatically log in...
|
by: bdeviled |
last post by:
I am deploying to a web environment that uses load balancing and to insure
that sessions persist across servers, the environment uses SQL to manage
sessions. The machine.config file determines how...
|
by: PipScouser |
last post by:
Hi,
Most times, but not always, after my session times out (default 20
mins) if a user clicks on any control that necessitates a code-behind
call, I get the 'Cannot find Server or DNS Error'...
|
by: Maspr |
last post by:
I am trying to build a mixed site of ASP and ASP.NET. I am having trouble
keeping the ASP session from timing out when using just the ASP.NET pages.
The ASP.NET pages has a Master Page with an...
|
by: goscottie |
last post by:
I used submodal as my popup window. With some tweaks, it working
great in my app. However, I can't find a way to detect session
timeout in the popup window. The app is a form based...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |