Standard for the use of session variable in webpart code.

Hi,
Why we should avoid using of session variables while writing code?
Is it not a standard?
Thanks,
Akhilesh Rao
Akhilesh Rao

On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best. 
You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production. 
If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
have different controls or sections made visible as the user progressed through the use case.
Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

Similar Messages

  • Override the GROUP system session variable within an initialization block

    Hi,
    We're trying to override the GROUP system session variable and having no luck. We've created an initialization block to return the semicolon-separated list we're looking for but when a user logs in, it seems like it is overridden with the default. When we change the name of the variable to something other than GROUP, it works great and we get the expected value. Is there something we're missing with overriding the particular value?
    Here is the query we're attempting to use for the variable:
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We also tried:
    Select
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    We made sure that the variable name was 'GROUP' as well.
    Not sure if it's important to note or not, but the returned values do correspond to existing applications groups already defined within OBI.
    Any help is greatly appreciated!
    Thanks,
    Jas

    since you have value as OpsReviewViewer;OpsReviewAuthor:BIAdministrator
    my not help row wise setting
    try to handle ; part using sql query so that you get those number of records to use row-wise
    so this
    Select 'GROUP',
       ListAgg(OBI_ROLE, ';') Within Group (Order By USER_EMAIL)
    From CSS_OBI_USER_ROLE
    Where USER_EMAIL In (':USER')
    with row-wise show work

  • Use of Session Variable in Dashboard Page XML

    Hi All,
    Can we use a Session variable in the Dashboard Page XML?
    My Requirement is,
    There are 1000+ users, each user will have access to same dashboard. But a different report in the same dashboard.
    So we want to Save individual user reports in the location /users/LOGIN_NAME/Financials/ABC
    and dynamically change the Dashboard Page XML, to accept Session Variable VALUEOF(NQ_SESSION.USER) in place of LOGIN_NAME.
    So that for each user, they will see only their report.

    On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best. 
    You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production. 
    If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
    have different controls or sections made visible as the user progressed through the use case.
    Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
    Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • OBIEE | Using Dynamic Session Variable in Physical Layer

    Hi All,
    Any idea if we can use Dynamic Session Variables (I think they are also called Repository Variables) in our physical layer. I basically need to set the value of this variable from dashboard when a link is clicked, and then use this in my SELECT query at physical layer so that OBIEE does not pull all the data from the database tables.
    Regards
    Adeel Javed
    Edited by: user10642426 on Apr 6, 2009 2:03 AM

    Christian,
    Thanks for the quick response, ok we have actually moved to a different solution now, we are actually using Direct Database Request because one of our reports is supposed to be accessing direct transactional system i.e. for this report we are using OBIEE as a reporting tool. We are able to do that and even create links between different reports i.e. based on prompt in Report A filter Report B, but the scenario now is that we need to set a presentation variable from Report A when a navigation link gets clicked, because so far according to our knowledge direct SQL only allows presentation variables in its WHERE clause. So, any ideas how can we set a presentation variable when a navigation link is clicked. Thanks.
    Regards
    Adeel Javed
    Edited by: adeeljaved on Apr 6, 2009 11:43 PM

  • Windows Server 2012 The licensing mode for the Remote Desktop Session Host server is not configured

    Hi
    I have a standard Windows Server 2012 that is hosted in the cloud by a hosting provider -
    This server has been up and running fir 6 months - recently we have been getting a warning
    "The licensing mode for the Remote Desktop Session Host server is not configured" - The Remote Desktop Session Host server is within its grace period, but the RD Session Host server has not been configured with any license server.
    Yet, we only use this with 2 connections as part of the standard licence agreement and this server is not used as a user's desktop only an ftp and web server- do therefore we do not need to purchase any cal licences (we have another server with the same
    hosting company that does not have this issue and has been up for 18months)
    Please can someone advise how I resolve this issue, the hosting company states that I must resolve it as they only host and resell the server licence
    Thank-you
    Richard Steele

    Hi Richard,
    You need to uninstall Remote desktop session host feature. After removing it, you will default two connections which does not need to purchase RD CALs'.
    Thanks,
    Umesh.S.K

  • The grace period for the Remote Desktop Session Host server has expired

    <p>I'm running Windows Server 2012, we only have 1 server and it's a DC.  I'm trying to RD to the server from my Windows 7 laptop. It was working fine on Friday but when I came in on Monday I got message saying that 'The remote session was disconnnected
    because there are no Remote Desktop License Servers available to provide a license'
    So after a bit of digging I found out my 'grace period' had expired, so ordered a new license which I got today, installed this all ok but still i cannot connect via RD I get the same message....went into the RD License Diagnoser and it said the problem
    was as follows
    'The grace period for the Remote Desktop Session Host server has expired, but the RD Session Host server has not been configured with any license servers. Connections to the RD Session Host server will be denied unless a license server is configured for
    the RD Session Host server.'
    Suggested Resolution as follows
    Configure a license server for the Remote Desktop Session Host server. If you have an existing license server, specify that license server for the RD Session Host Server. Otherwise, install RD Licensing on a computer on your network and Configure RD Session
    Host Server to use it.'
    I cannot figure out how to do this as I cannot find the RD Session Host Server tool. 
    Can any of you lovely people help me please

    Hello,
    Best option would be to assign the license server by using AD GPO. Youl will need to configure the following:
    Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing
    and define the settings for:
    Use the specified Remote Desktop License Server
    Set the Remote Desktop Licensing mode
    Then assign the policy tho your server.
    regards Robert Maijen

  • Adobe Acrobat 9 Standard for the Mac?

    Okay, I apologize for what may appear to be a frightfully stupid question, but is there an Acrobat 9 Standard for the Macintosh? There appears to be support files and such for Adobe 9 Pro for the Mac available, but whenever I search for the Adobe 9 Standard, all I can seem to come up with is the Windows version...?
    If not, and if for some unknown reason, they aren't updating the two version numbers in sync with each other, what's the most recent version of Acrobat Standard for the Mac? Or will I be stuck with 9 Pro as my only option, and end up having to pay for the additional features I don't need?
    Steve M

    Honestly, if you are creating a PDF, say in a Business setting, to go on a website. Except when it specifically meant to go to a Printer. Do you need the Print Press Stuff??
    More bang for the Buck would create a Version For Print press industry.
    Then Have then the pro version have the PDF forms Creation stuff that available in PC only now.
    The feature set that was in Acrobat 5 is a much better fit. If someone need Print Press features sell it as a $50.00-100.00 add-on.
    There are some features related to Print press I never have used. But I got them because I needed forms creation for the Web.

  • What is the use of session in jsp

    hai,
    what is the use of session in jsp. i cant understand from books. give some practical approach
    thanks

    give some practical approachYou sound like a supervisor ordering for a cup of coffee.
    I DONT TAKE ORDERS !!
    IMAO
    Which book did you refer ? Did you google ?

  • Dynamic publishing not enabling the use of dynamic variables (flashvars)

    I'm have having issues with my website [url removed by moderator].  The Dynamic publishing is not enabling the use of dynamic variables.  Standard magento 1.8.1 install.

    Dear Yugandhar,
      It's work. Thanks. This is a work around way to avoid retrieve list of values Error. I was suspected 2 reasons to cause this issues: 1. prompt option. 2. LOV option.  So, the cause is not prompt option. The main cause could be LOV( list of values ).
    After disable LOV, Republish universe, reset query filter in report, re-query report, restart server(Core, Webi) from CMC.
    I restore LOV option back to universe and republish universe to server.
    Run Query again. The report not retrieve list of values.  The error not show up.
    I try delete the cause problem dimension(year dim), add others dimension and add  the cause problem dimension to query filter with prompt option back. The error not come up.
    Query will not retrieve list of values.
    Finally, the report come back normal status.
    But. I doubt why only year dim will cause LOV retrieve problem but others dim.
                                                                                                                                                  Sam Sheen

  • Industry Standards for the Retail Industry

    I want to know " SAP recommends which of these Industry Standards for the Retail Industry?
    1.GS1
    2.ANSI ASC X12  
    3.eCOM 
    4.GSMP  
    5.EPCglobal  
    6.GDSN 
    7.GCI
    8.VICS

    SAP has avoided making any recommendations. I specifically asked one of their architects a similar question a couple of weeks ago.
    In general the X12 and EDIFACT standards are king within the retail industry. Within the United States X12 has been the default standard for many years and is used by all the giants. Within the European Union EDIFACT is the default standard and is used by the vast majority of retailers. However the UK has a standard which is called Tradacoms. In my experience UK retailers have, when pushed, also offered EDIFACT messaging. It should be noted that these formats are not XML. However many XML convertors exist for them. X12, EDIFACT and Tradacoms are what are commonly referred to as Traditional EDI.
    The GS1 standard called eCOM is being increasingly adopted. I do know that Accenture and CapGemini have recently been heavily involved in promoting GS1 and eCOM. This is because eCOM standard is realistically the most heavily backed replacement for the Traditional EDI standards. The several of the largest US and European retailers and manufactures are now throwing their weight behind eCOM.

  • Restrictions for the use of MapKit in a paid iOS6 app that caches map tiles.

    Can anybody advise what restrictions exist for the use of MapKit for a paid app that caches map tiles for off-line use.  The app is targetted at iOS6 and above.  I haven't found any clear answers on this,
    Is there a cost associated with using map tiles if you charge more than $0 for the app?  I understood that this could not be done for free in iOS 5 due to Google licence terms.
    Also, under the iOS6 Apple Maps licence, can map tiles be cached for off-line use?
    Many thanks to anyone who has the answer to these questions.  A link to a document from Apple would be fantastic.
    Geoff

    Just in case you didn't already go there and see it, there is a specific developer forum for discussing MapKit and some other things I can't talk about in a public place.  Look for a developer forum that mentions maps in the name and that'll be it.  The people there can answer your question if it hasn't already been answered.

  • Restriction for the use of last_record in 10g forms

    Hi,
    When I was working on Forms 6i with the query in the trigger When_new_form_instance:
    go_block('ABC');
    execute_query;
    last_record;
    first record;
    go_block('DEF');
    execute_query;
    last_record;
    first record;
    It worked and gave correct data on frontend.
    When the same was used in 10g forms, it gave incorrect data.When we removed last_record from the query, it worked.
    Could somebody tell me is there some kind of restriction for the use of last_record in 10g forms? If yes, what kind of?
    Thanks,
    Neha

    When I set Query All records to Yes.
    Surprisingly it gives incorrect data.
    This is what is bothering me.
    As i said earlier i was using last_record for
    navigation purpose to fetch all the records from the
    database and then first_record to highlight the first
    record.
    You don't need to do that, that is poor programming logic. Instead change the block property Query All Records and set it to Yes.
    This will fetch all the records from the database and the highlight will be on the first record;
    Regards,
    Tony

  • How do I request a "Sole source letter" from Adobe so I can purchase six copies of Creative Suite 6 Design Standard for the City of St Louis?

    How do I request a "Sole source letter" from Adobe so I can purchase six copies of Creative Suite 6 Design Standard for the City of St Louis?

    Start Here  If after selecting relevant responses you are unable to find a solution, choose "Still need help? Contact us." and the chat or phone contact option.

  • [svn] 1313: Fix for the use namespace problems we've been having with ASC ( I hope).

    Revision: 1313
    Author: [email protected]
    Date: 2008-04-20 09:41:41 -0700 (Sun, 20 Apr 2008)
    Log Message:
    Fix for the use namespace problems we've been having with ASC (I hope). The problem was that the use directive was being defined after we had called finish package. The UseDirectiveNode has a pkgdef ptr, and does different things depending if that ptr is null or not. It should not be null when the UseDirective is inside the package - but since we were generating the UseDirectiveNode after we had called finishPackage the UseDirectiveNode didn't have it's pkgdef ptr set, and so things went awry as the package didn't get set up with all the correct open namespaces. I haven't tested this in authoring/flex but I am pretty sure that this will fix all the problems we're seeing.
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/Parser.java

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Garageband - does it allow for the use of software like "ILIO Origins for EXS/GIGA?"

    I am completely new to the modern world of iOS (just bought a Apple iMac ME089LL/A 27-Inch Desktop), and Garageband, and recording music and such. I've watched enough tutorials now to know that Garageband has virtual instrument libraries. I want to know if Garageband will allow for the use of more sophisticated sounds, specifically those in the ILIO Origins for EXS/GIGA

    I am also baffled. I tried to find this "default Captivate quiz" in the help section of Captivate with no results. When I again contacted the representative, he closed the conversation before speaking with me.
    Thank you for choosing Adobe. A representative will be with you shortly. Your estimated wait time is 0 minute(s) and 4 second(s) or longer as there are 1 customer(s) in line ahead of you.
    You are now chatting with 'Khyati'
    Thank you for chatting with us. Please click the "Close" button on the top right of the chat window to tell us how we did today.
    I have posted the entire correspondence on Adobe Captivate's Facebook page in the hopes that I might get some swift assistance from the company.

Maybe you are looking for

  • Forward button grayed out in TB v31

    Customized the toolbars in TB v31 to add a few buttons, including Forward on the toolbar on the screen that's open when reading a specific message. Forward is grayed out and doesn't work, but the other buttons I added to this toolbar all work. I've r

  • I think lumia 920 is too big

    Hi,nokia guys!       I am a chinese nokia user.My current cellphone is E71 and I love it very much,it's beauitiful and suitable. When N9 was issued,it was a surprise to me.Good  externals and nice experiment,perfect sreen size,the only shortage is la

  • G41m p28 Sleep without fan ?

    I can't get my PC to sleep under Win7; the fan stays on. The manual says: if the mainboard has a System Hardware Monitor chipset on-board, you must use a specially designed fan with speed sensor to take advantage of the CPu fan control. I've checked

  • Open, Open Containing Folder in Windows Explorer Using java

    How to open a file using the default application using java code? Ex: - Open a JPG file using its default image viewer (Ex: Piscasa 3)..... (Not Inside the Java Application) Then how to open a file containing folder with that file selected? Couldn't

  • Adding QM to Existing UCCX Premium w CR

    Trying to understand the licensing behind adding QM to an existing deployment of CR. UCCX v 9.x Ordering guide is not very clear on part #, if any