473,776 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handeing Session and authentication timeout through callback scrip

I implimented ASP.NET 2.0 Client callback script (ICallbackEvent Handler) to
get the result back from server without postback the page. Problem is when
seesion expires or authentication times out, callback script does not do
anything and hangs. If I click another key which requires postback after
that, I get following error:
-----------
Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during the
previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.
-----------

If I click on any button which perfoms postback on page, everything is fine
and I'm getting forwarded to login page, but when I click on the button which
implemented client callback script on and then a postback button, the error
happens.
I was wondering how can I check on session status on callback script funtion.

--
Thanks,
Jan 26 '06 #1
3 2246
Can't you have the server-side method that is called check the Session and
Authentication state, and include something to that effect in the callback?

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Nahrin" wrote:
I implimented ASP.NET 2.0 Client callback script (ICallbackEvent Handler) to
get the result back from server without postback the page. Problem is when
seesion expires or authentication times out, callback script does not do
anything and hangs. If I click another key which requires postback after
that, I get following error:
-----------
Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during the
previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.
-----------

If I click on any button which perfoms postback on page, everything is fine
and I'm getting forwarded to login page, but when I click on the button which
implemented client callback script on and then a postback button, the error
happens.
I was wondering how can I check on session status on callback script funtion.

--
Thanks,

Jan 26 '06 #2
RaiseCallbackEv ent method has implementation which returns error message as
session expired, but looks like it won't get executed!
I log user authentication info on page init and RaiseCallbackEv ent method.
when session expires (by reseting iis), and I click on callback button, none
of them gets called.

--
Thanks
"Peter Bromberg [C# MVP]" wrote:
Can't you have the server-side method that is called check the Session and
Authentication state, and include something to that effect in the callback?

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Nahrin" wrote:
I implimented ASP.NET 2.0 Client callback script (ICallbackEvent Handler) to
get the result back from server without postback the page. Problem is when
seesion expires or authentication times out, callback script does not do
anything and hangs. If I click another key which requires postback after
that, I get following error:
-----------
Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during the
previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.
-----------

If I click on any button which perfoms postback on page, everything is fine
and I'm getting forwarded to login page, but when I click on the button which
implemented client callback script on and then a postback button, the error
happens.
I was wondering how can I check on session status on callback script funtion.

--
Thanks,

Jan 26 '06 #3
Nahrin,
If you reset IIS, you have more problems than just getting rid of a Session.
You have restarted the entire process that was hosting the app in the first
place!
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Nahrin" wrote:
RaiseCallbackEv ent method has implementation which returns error message as
session expired, but looks like it won't get executed!
I log user authentication info on page init and RaiseCallbackEv ent method.
when session expires (by reseting iis), and I click on callback button, none
of them gets called.

--
Thanks
"Peter Bromberg [C# MVP]" wrote:
Can't you have the server-side method that is called check the Session and
Authentication state, and include something to that effect in the callback?

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Nahrin" wrote:
I implimented ASP.NET 2.0 Client callback script (ICallbackEvent Handler) to
get the result back from server without postback the page. Problem is when
seesion expires or authentication times out, callback script does not do
anything and hangs. If I click another key which requires postback after
that, I get following error:
-----------
Failed to load viewstate. The control tree into which viewstate is being
loaded must match the control tree that was used to save viewstate during the
previous request. For example, when adding controls dynamically, the
controls added during a post-back must match the type and position of the
controls added during the initial request.
-----------

If I click on any button which perfoms postback on page, everything is fine
and I'm getting forwarded to login page, but when I click on the button which
implemented client callback script on and then a postback button, the error
happens.
I was wondering how can I check on session status on callback script funtion.

--
Thanks,

Jan 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
43197
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
5
5292
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the sessionstate inproc mode and users are randomly losing their session. I do not believe it is happening across all users at one time. It seems to happen to different users at different times, but I am only going off heresay. The aspnet worker...
4
2507
by: Sosh | last post by:
Hi, I wonder if anyone knows how an application that employs remote scripting/callbacks should deal with an authentication timeout during a callback? At the moment my application just stops working until I refresh the page and log in again. I'm not really sure what its going in - perhaps the framework is trying to redirect the callback result to the login page? Any ideas?
2
4915
by: Aryan | last post by:
Hi, I have put my session related parameter in web.config under system.web, given below is the code for same. <system.web> <sessionState timeout ="1440" mode ="InProc" /> </system.web> this session timeout is not working out, as this shows me login page again if i dont do something for more then 20 minutes.
0
1268
by: 'Mani | last post by:
Hi All, I need to abandon a different session and want to know how to do this. Session.Abandon() will abndon only the current session associated with the current request. But, my necessity is different. I have this authentication object whose sliding expiration value in the cache is less than the session timeout value. I want to abandon the session once the authentication object is removed from the cache. I cannt keep both the session...
20
3781
by: Simon Says | last post by:
Hi, I've a login page in which after authenticating it via the Oracle DB, I will stored the user information into the Session. However, when the Session timeout occurs, all of the user information will be lost. I've tried doing a Reponse.Redirect call back to my login page whenever I detected the Session is null, but I kept getting the exception saying "... Redirect not all in Page Callback".
25
6101
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
4
2339
by: Nathan Sokalski | last post by:
I have a page that uses Session variables when generating the SQL statements used to submit and retrieve data from a database. However, because I don't know how long the user will be on the page, setting the Session.Timeout property doesn't help me avoid errors (I can obviously set the value to a very high value, but that still doesn't completely solve the problem). Is there any way for me to avoid the Session timing out? Thanks. --...
9
1826
by: gnewsgroup | last post by:
I am using forms authentication for my web application. In web.config, I have this: <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="120" name=".ASPXAUTH" path="/"
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.