Ask a Question related to ASP.NET General, Design and Development.
-
Marina #1
Re: Is this a good way? Please advise.
What exactly do you want to store in session? Are we talking datasets with
10000 rows each, or just some strings or integers?
Your process implies distrust of the developers. Why not just decide which
session variables you need, and then that's what the developers would
create? Just make it clear that there has to be an approval process first -
but isn't this complicated scheme a bit overboard? I mean, if someone
doesn't want to follow the rules, he will just access the Session object
directly. And if everyone is willing to follow them, then they will just do
so, and be responsible with the Session object.
"Jerry" <JGAO2183@rogers.com> wrote in message
news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...going> Dear All,
> My company is designing a new ASP.Net web application. Becasuse of the
> concern of abusing Session variable(will consume memory), our team isin> to use following apporach to avoid it. Some of team members think it is
> unnecessary and don't agree with this approach. I would like to hear your
> oppinion about this. Or if you use any of process to limit the developers
> using session variables in the ASP web application. Thank you in advance.
> Following is our proposal process.
> 1. Add the session variable names to the webconfig file. Only one personthe> the team( 7 developers) is allowed to add it. So if other developers inthe> team need to add new session variable, they need to ask that person to add
> it in the Webconfig file first.
> 2. Create a wrapper class for getting and setting the session variable
> values. This wrapper class will check if the session variable exists in> webconfig file. If not, error returns. Developers ,instead of calling
> Session object directly, will call the wrapper class method.
>
>
>
> Regards
>
> Jerry
>
>
>
Marina Guest
-
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you
<RonGrossi382872@yahoo.com> wrote in message news:1114393703.900419.199790@f14g2000cwb.googlegroups.com... This is the most important question of... -
Xcart no good, support no good, need good shopping cart!!!
I need a good quality php shopping cart to port to my site, allowing software downloads and book sales. Integrating ease is really important and... -
Kevin Spencer #2
Re: Is this a good way? Please advise.
Hi Jerry,
Your question is a bit confusing to me. Session State is global only to a
single user Session. Data stored in the Web.Config file is global to the
entire application and all user Sessions. Session State is a place to store
user-specific, Session-Specific information. Therefore, if the data you're
talking about is global, you should certainly NOT be using Session State, as
the data would be reproduced unnecessarily in each user's Session, which
would be a memory drain.
I think you need to give some thought to identifying what data is
User/Session-specific, and what data is global, and use the appropriate
mechanism for each type of data.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Complex things are made up of
lots of simple things.
"Jerry" <JGAO2183@rogers.com> wrote in message
news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...going> Dear All,
> My company is designing a new ASP.Net web application. Becasuse of the
> concern of abusing Session variable(will consume memory), our team isin> to use following apporach to avoid it. Some of team members think it is
> unnecessary and don't agree with this approach. I would like to hear your
> oppinion about this. Or if you use any of process to limit the developers
> using session variables in the ASP web application. Thank you in advance.
> Following is our proposal process.
> 1. Add the session variable names to the webconfig file. Only one personthe> the team( 7 developers) is allowed to add it. So if other developers inthe> team need to add new session variable, they need to ask that person to add
> it in the Webconfig file first.
> 2. Create a wrapper class for getting and setting the session variable
> values. This wrapper class will check if the session variable exists in> webconfig file. If not, error returns. Developers ,instead of calling
> Session object directly, will call the wrapper class method.
>
>
>
> Regards
>
> Jerry
>
>
>
Kevin Spencer Guest
-
Jerry #3
Re: Is this a good way? Please advise.
Hi, Marina,
Thank you for your response. The data stored in the session could be 10000
rows data set as you said, it could also be string or intergers. The only
purpose of this process is to limit developers from using session
variables.
So your vote: NO
Thank you again.
Jerry
"Marina" <zlatkinam@nospam.hotmail.com> wrote in message
news:edT$qOFWDHA.2276@TK2MSFTNGP10.phx.gbl...with> What exactly do you want to store in session? Are we talking datasetswhich> 10000 rows each, or just some strings or integers?
>
> Your process implies distrust of the developers. Why not just decidefirst -> session variables you need, and then that's what the developers would
> create? Just make it clear that there has to be an approval processdo> but isn't this complicated scheme a bit overboard? I mean, if someone
> doesn't want to follow the rules, he will just access the Session object
> directly. And if everyone is willing to follow them, then they will justyour> so, and be responsible with the Session object.
>
> "Jerry" <JGAO2183@rogers.com> wrote in message
> news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...> going> > Dear All,
> > My company is designing a new ASP.Net web application. Becasuse of the
> > concern of abusing Session variable(will consume memory), our team is> > to use following apporach to avoid it. Some of team members think it is
> > unnecessary and don't agree with this approach. I would like to heardevelopers> > oppinion about this. Or if you use any of process to limit theadvance.> > using session variables in the ASP web application. Thank you inadd> in> > Following is our proposal process.
> > 1. Add the session variable names to the webconfig file. Only one person> the> > the team( 7 developers) is allowed to add it. So if other developers in> > team need to add new session variable, they need to ask that person to> the> > it in the Webconfig file first.
> > 2. Create a wrapper class for getting and setting the session variable
> > values. This wrapper class will check if the session variable exists in>> > webconfig file. If not, error returns. Developers ,instead of calling
> > Session object directly, will call the wrapper class method.
> >
> >
> >
> > Regards
> >
> > Jerry
> >
> >
> >
>
Jerry Guest
-
Rajeev Soni #4
Re: Is this a good way? Please advise.
Hi,
well using the session object whenever required / storing the appropriate values is ok, but restricting the developers by just defining the rule of readding the session variable name from the Web.Config file will just add another over head of reading an external file first then reading/placing the values in session.
best thing to do is to access session directly without storing the names in web.config file and as add a coding standard to project development as adding any new session variables should be... approved.
you can also have peer reviews on the code
and u can anytime easily check the values in session by simple writing the peice of code
for (int 1=0; i<Session.Count; i++)
{
Response.Write("<BR>Key : " + Session.Keys[i] + " Value : " + Session[i].ToString());
}
Rajeev
"Jerry" <JGAO2183@rogers.com> wrote in message news:5rHWa.72322$rsJ.33292@news04.bloor.is.net.cab le.rogers.com...> Hi, Marina,
> Thank you for your response. The data stored in the session could be 10000
> rows data set as you said, it could also be string or intergers. The only
> purpose of this process is to limit developers from using session
> variables.
>
> So your vote: NO
> Thank you again.
>
>
> Jerry
>
> "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
> news:edT$qOFWDHA.2276@TK2MSFTNGP10.phx.gbl...> with> > What exactly do you want to store in session? Are we talking datasets> which> > 10000 rows each, or just some strings or integers?
> >
> > Your process implies distrust of the developers. Why not just decide> first -> > session variables you need, and then that's what the developers would
> > create? Just make it clear that there has to be an approval process> do> > but isn't this complicated scheme a bit overboard? I mean, if someone
> > doesn't want to follow the rules, he will just access the Session object
> > directly. And if everyone is willing to follow them, then they will just> your> > so, and be responsible with the Session object.
> >
> > "Jerry" <JGAO2183@rogers.com> wrote in message
> > news:34xWa.22262$4UE.7821@news01.bloor.is.net.cabl e.rogers.com...> > going> > > Dear All,
> > > My company is designing a new ASP.Net web application. Becasuse of the
> > > concern of abusing Session variable(will consume memory), our team is> > > to use following apporach to avoid it. Some of team members think it is
> > > unnecessary and don't agree with this approach. I would like to hear> developers> > > oppinion about this. Or if you use any of process to limit the> advance.> > > using session variables in the ASP web application. Thank you in> add> > in> > > Following is our proposal process.
> > > 1. Add the session variable names to the webconfig file. Only one person> > the> > > the team( 7 developers) is allowed to add it. So if other developers in> > > team need to add new session variable, they need to ask that person to>> > the> > > it in the Webconfig file first.
> > > 2. Create a wrapper class for getting and setting the session variable
> > > values. This wrapper class will check if the session variable exists in> >> > > webconfig file. If not, error returns. Developers ,instead of calling
> > > Session object directly, will call the wrapper class method.
> > >
> > >
> > >
> > > Regards
> > >
> > > Jerry
> > >
> > >
> > >
> >
>Rajeev Soni Guest



Reply With Quote

