473,480 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IHttpHandler.IsReusable

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 from the
Session cache, twiddles some bits, and then writes the value back.
Since everything is a local variable (except the one from the cache)
am I safe in marking it as reusable?

Thanks,
Bryan
Nov 21 '05 #1
2 8024
Hi Bryan,

Welcome to ASPNET newsgroup.
Regarding on the question about the IHttpHandler.IsReusable property, it is
used to indicate whether we can use a single HttpHandler instance to
process multiple concurrent requests. Actually, we can consider each
client requests as a worker thread on the serverside when being processed
through the ASP.NET pipeline.. So if we want to mark our HttpHandler as
IsReusable= ture, we need to make sure that the code in our HttpHandler's
ProcessRequest method is threadsafe. In otherwords, the code in the
ProcessRequest should not rely on any states or data which could be
modified by other concurrent request threads (e.g. the Httphandler class's
non-static member fields....)...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: br***@newsgroups.nospam
| Subject: IHttpHandler.IsReusable
| Date: Sun, 20 Nov 2005 20:53:20 -0600
| Message-ID: <tf********************************@4ax.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: adsl-68-253-213-6.dsl.emhril.ameritech.net 68.253.213.6
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:359696
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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 from the
| Session cache, twiddles some bits, and then writes the value back.
| Since everything is a local variable (except the one from the cache)
| am I safe in marking it as reusable?
|
| Thanks,
| Bryan
|

Nov 21 '05 #2
Hi Bryan,

Have you got any further idea on this or does the things in my last reply
helps you a little? if there're anything else we can help, please feel free
to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 127801003
| References: <tf********************************@4ax.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Mon, 21 Nov 2005 08:09:29 GMT
| Subject: RE: IHttpHandler.IsReusable
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <lv*************@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 52
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:359737
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Hi Bryan,
|
| Welcome to ASPNET newsgroup.
| Regarding on the question about the IHttpHandler.IsReusable property, it
is
| used to indicate whether we can use a single HttpHandler instance to
| process multiple concurrent requests. Actually, we can consider each
| client requests as a worker thread on the serverside when being processed
| through the ASP.NET pipeline.. So if we want to mark our HttpHandler as
| IsReusable= ture, we need to make sure that the code in our HttpHandler's
| ProcessRequest method is threadsafe. In otherwords, the code in the
| ProcessRequest should not rely on any states or data which could be
| modified by other concurrent request threads (e.g. the Httphandler
class's
| non-static member fields....)...
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
| --------------------
| | From: br***@newsgroups.nospam
| | Subject: IHttpHandler.IsReusable
| | Date: Sun, 20 Nov 2005 20:53:20 -0600
| | Message-ID: <tf********************************@4ax.com>
| | X-Newsreader: Forte Agent 3.1/32.783
| | MIME-Version: 1.0
| | Content-Type: text/plain; charset=us-ascii
| | Content-Transfer-Encoding: 7bit
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: adsl-68-253-213-6.dsl.emhril.ameritech.net
68.253.213.6
| | Lines: 1
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:359696
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | 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 from the
| | Session cache, twiddles some bits, and then writes the value back.
| | Since everything is a local variable (except the one from the cache)
| | am I safe in marking it as reusable?
| |
| | Thanks,
| | Bryan
| |
|
|

Nov 23 '05 #3

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

Similar topics

0
1445
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...
1
3061
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...
13
4280
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...
1
4241
by: Angrez Singh | last post by:
Hi, If you just want to implement your own HttpHandler using the IHttpHandler interface you have to implement a function and a property of the interface. The function ProcessRequest() is used to...
0
1048
by: Stu | last post by:
Hi, I am trying to write a basic httphandler to 'fake' that pages actually exist. I have copied the code below from various sites - but the line 'Implements IHttpHandler' reports an error "type...
1
1271
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...
1
4293
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...
1
246
by: APA | last post by:
When set to true does this prevent multiple threads from processing this handler simultaneously,i.e. one thread must wait for the completion of the current thread executing the class before it...
0
1184
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/...
0
6915
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...
0
7097
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...
1
6750
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...
0
6993
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...
1
4794
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...
0
4493
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...
0
1307
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 ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
193
bsmnconsultancy
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...

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.