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

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 8020
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
Oralloy
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,...
0
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...

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.