05-04-04 08:36 PM
thanks alan for ur input.
i need the check done based on session. the piece of code shd be
executed onlu once per session. so how will it work if we set an
application variable at application_start ?
thanks
sabari
pcherry@online.microsoft.com (Alan Cherry (MS)) wrote in message news:<00sTTHhLEHA.1136@cpms
ftngxa10.phx.gbl>...
> One possible solution would be to place an application scoped boolean in
> global.asax. At application_start set this value to false.
>
> In begin_request, check to see if it is false, execute your code and set i
t
> to true.
>
>
>
>
> Alan Cherry, MCSE, MCP+I
> Microsoft Developer Support Internet - Integration CPR
> Are you secure? For information about the Microsoft Strategic Technology
> Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.com/security
>
> This posting is provided ?AS IS? with no warranties, and confers no rights
.
> You assume all risk for your use. © 2004 Microsoft Corporation. All rights
> reserved.
>
>
>
> --------------------
> From: cpsabari@netscape.net (Sabari)
> Newsgroups: microsoft.public.commerceserver.general
> Subject: Application_BeginRequest
> Date: 6 Apr 2004 09:08:48 -0700
> Organization: http://groups.google.com
> Lines: 10
> Message-ID: <b2a23a7.0404060808.58cec5c6@posting.google.com>
> NNTP-Posting-Host: 192.127.94.7
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 8bit
> X-Trace: posting.google.com 1081267728 26909 127.0.0.1 (6 Apr 2004 16:08:4
8
> GMT)
> X-Complaints-To: groups-abuse@google.com
> NNTP-Posting-Date: Tue, 6 Apr 2004 16:08:48 +0000 (UTC)
> Path:
> cpmsftngxa06.phx.gbl!TK2MSFTNGXS01.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNG
P0
> 8.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news.glorb.com!postnews1.
go
> ogle.com!not-for-mail
> Xref: cpmsftngxa06.phx.gbl microsoft.public.commerceserver.general:13571
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> All,
> I need to execute a piece of code in Application_BeginRequest only
> once. How do I do that ? The ideal solution would be to set a session
> variable after this piece of code is executed and check for that
> variable before the subsequent executions but Session variables cannot
> be used in Application_BeginRequest. Due to some other issues, this
> code cannot reside in Session_Start. Any ideas ?
>
> Thanks
> Sabari.
>
> --
[ Post a follow-up to this message ]
|