Application_BeginRequest
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Application_BeginRequest




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Application_BeginRequest  
Sabari


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-06-04 05: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.





[ Post a follow-up to this message ]



    Re: Application_BeginRequest  
Sabari


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-11-04 09: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.g
oogle.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.





[ Post a follow-up to this message ]



    RE: Application_BeginRequest  
Alan Cherry


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 06: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.






[ Post a follow-up to this message ]



    Re: Application_BeginRequest  
Sabari


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:41 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register