I've got the IRequiresSessionState interface implemented, but because of
forms authentication my page fires twice and causes certain session
functions to update twice which messes up my values.
Is there anyway to keep ProcessRequest from firing twice, or detect if it
has fired once and not call certain functions in the page again on the
second time through? 4 2197
Hi, because of forms authentication my page fires twice
What do you mean with this? Can you elaborate a bit? Do you have some custom
authentication in use with Forms authentication (or just that page gts
executed twice for a good reason?).
--
Teemu Keiski
ASP.NET MVP, Finland
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:ud**************@TK2MSFTNGP14.phx.gbl... Hi,
because of forms authentication my page fires twice What do you mean with this? Can you elaborate a bit? Do you have some custom authentication in use with Forms authentication (or just that page gts executed twice for a good reason?).
I was refering to this thread: http://tinyurl.com/66lm8
I'm experiencing the same thing. I make a handler and create a page that is
made in csharp.
All events in the page class fire twice, and I'm assuming that is due to the
comment in the link above.
Everything else works fine, that page displays, events that I wire up in
controls fire and all is great.
Except session variables end up getting set twice. So:
Session("item1") = Session("item1") + somevalue
ends up happending twice and I get
Session("item1") = Session("item1") + somevalue + somevalue
I wondering if anyone else might have a convenient "global" work around for
this. I've run into a wall, as I've been working on it for three days now. -- Teemu Keiski ASP.NET MVP, Finland
Hmm...can you try getting past it with checking Request.IsAuthenticated (or
does it return Ture in your case for the very first request)?
--
Teemu Keiski
ASP.NET MVP, Finland
"Chance Hopkins" <ch************@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl... "Teemu Keiski" <jo****@aspalliance.com> wrote in message news:ud**************@TK2MSFTNGP14.phx.gbl... Hi,
because of forms authentication my page fires twice
What do you mean with this? Can you elaborate a bit? Do you have some custom authentication in use with Forms authentication (or just that page gts executed twice for a good reason?).
I was refering to this thread:
http://tinyurl.com/66lm8
I'm experiencing the same thing. I make a handler and create a page that is made in csharp. All events in the page class fire twice, and I'm assuming that is due to the comment in the link above. Everything else works fine, that page displays, events that I wire up in controls fire and all is great.
Except session variables end up getting set twice. So:
Session("item1") = Session("item1") + somevalue
ends up happending twice and I get
Session("item1") = Session("item1") + somevalue + somevalue
I wondering if anyone else might have a convenient "global" work around for this. I've run into a wall, as I've been working on it for three days now.
-- Teemu Keiski ASP.NET MVP, Finland
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl... Hmm...can you try getting past it with checking Request.IsAuthenticated (or does it return Ture in your case for the very first request)?
Good thinking, but it looks like it returns true both times.
I also just tried setting this in web.config
<pages autoEventWireup="false" />
as discribed in this article: http://support.microsoft.com/default...b;EN-US;317690
I heard that fired events twice sometimes, although I'm working in csharp.
I may end up having to figure out a different way to pass this value around.
It would be nice to be able to figure out a work around though, for the
future. -- Teemu Keiski ASP.NET MVP, Finland
"Chance Hopkins" <ch************@hotmail.com> wrote in message news:O2**************@TK2MSFTNGP10.phx.gbl... "Teemu Keiski" <jo****@aspalliance.com> wrote in message news:ud**************@TK2MSFTNGP14.phx.gbl... Hi,
because of forms authentication my page fires twice
What do you mean with this? Can you elaborate a bit? Do you have some custom authentication in use with Forms authentication (or just that page gts executed twice for a good reason?).
I was refering to this thread:
http://tinyurl.com/66lm8
I'm experiencing the same thing. I make a handler and create a page that is made in csharp. All events in the page class fire twice, and I'm assuming that is due to the comment in the link above. Everything else works fine, that page displays, events that I wire up in controls fire and all is great.
Except session variables end up getting set twice. So:
Session("item1") = Session("item1") + somevalue
ends up happending twice and I get
Session("item1") = Session("item1") + somevalue + somevalue
I wondering if anyone else might have a convenient "global" work around for this. I've run into a wall, as I've been working on it for three days now.
-- Teemu Keiski ASP.NET MVP, Finland
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lapin |
last post by:
I'm trying to get access to session variables from an IHttpHandler
class. In several places I've seen the solution posted as in this
message:
>If you define your own custom HttpHandler, you need...
|
by: lapin |
last post by:
I'm trying to get access to session variables from an
IHttpHandler
class. In several places I've seen the solution posted as
in this
message:
>If you define your own custom HttpHandler, you...
|
by: Sky Sigal |
last post by:
I have created an IHttpHandler that waits for uploads as attachments for a
webmail interface, and saves it to a directory that is defined in
config.xml.
My question is the following:
assuming...
|
by: vimakefile |
last post by:
I'd like to have the concept of a Page (different code-behind file for
each url, session state, etc.) but be able to specify my own custom
HTTP payload.
(I don't want to use any Asp.Net forms,...
|
by: bryan |
last post by:
I can't find much info on what makes an instance of the handler
reusable. If it maintains no internal state, I would assume that it is
safe to be reusable - correct? I have one that grabs a value...
| |
by: David Thielen |
last post by:
Hi;
I just wrote my first IHttpHandler and am having a problem. If the content
type is "text/html" then the below code works fine. But if it's "text/plain"
then my browser gets:
The XML page...
|
by: X |
last post by:
I am trying to invoke a javascript function from IHttpHandler using
Context.Response.Write. The function is present in .js file and is not
being invoked. The following snippet is called from...
|
by: Aartware |
last post by:
I've read all the items about the IHttpHandler and the session-object
and I see nothing wrong with my code, but still I have no session
object.
This is my code:
Imports System
Imports...
|
by: shapper |
last post by:
Hello,
I am using an ASP.NET 3.5 SP1 and a while ago I created an
IHttpHandler that transforms a Sitemap XML file to a compatible Google
Sitemap (https://www.google.com/webmasters/tools/docs/en/...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| | |