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, 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,
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,
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, This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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.
|
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...
|
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?
|
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.
|
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...
| |
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".
|
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
|
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.
--...
|
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="/"
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |