Commerce Server General - Application_BeginRequest

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > May 2004 > Application_BeginRequest





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Application_BeginRequest
Sabari

2004-04-06, 12:37 pm

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.
Sabari

2004-04-11, 4:27 pm

It should've been

> I need to execute a piece of code in Application_BeginRequest only
> once in a session.


any pointers anyone ?
thanks

cpsabari@netscape.net (Sabari) wrote in message news:<b2a23a7.0404060808.58cec5c6@posting.google.com>...
> 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.

Alan Cherry

2004-04-29, 1:37 pm

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 it
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:48
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!TK2MSFTNGP0
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.

Sabari

2004-05-04, 3: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@cpmsftngxa10.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 it
> 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:48
> 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!TK2MSFTNGP0
> 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.
>
> --

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com