473,378 Members | 1,333 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,378 software developers and data experts.

Handeing Session and authentication timeout through callback scrip

I implimented ASP.NET 2.0 Client callback script (ICallbackEventHandler) 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 2220
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 (ICallbackEventHandler) 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
RaiseCallbackEvent 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 RaiseCallbackEvent 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 (ICallbackEventHandler) 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:
RaiseCallbackEvent 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 RaiseCallbackEvent 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 (ICallbackEventHandler) 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
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
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...
4
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...
2
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...
0
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...
20
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...
25
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
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,...
9
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"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
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...
0
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...
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: 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: 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
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...

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.