.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

What happens to a page's cache when a user logs in?

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net

When you cache a page I assume you are saving the rendered html that gets sent to the user who requested the page. What happens when the person who requests the page is logged in and their user name is displayed at the top of the page. This I assume will change the html that is rendered and thus mean the cache is rebuilt?

If so is there any point caching pages in such a scenario as I assume there will be a performance penalty rebuilding and storing the cache all the time?

I am not sure if this makes any difference but all the pages have a master page and this is where the login is displayed.



View Complete Post

More Related Resource Links

Building Re-Usable ASP.NET User Control and Page Libraries with VS 2008


I am having problems with a user control. I want my solution to have a separate project for holding my user controls.

The main project can get a reference to this user control project and can import this user control dll into my main project. 

Thanks in advance,

Dheeraj Mittal


Knowing the event occured in user control in current page




      My web application has user control which uses third party controls called Devexpress controls. The user control is a menu  and is part of the Master page. It is placed there because this needs to be available in all the pages. My user controls raises a even on item clicked. Now, My question is that Is there any way to know that the event has occurred in page_load of the current page in which I am in?

How to process data AFTER page is completely loaded for the user?


I have some logging that has to be done, which are some database update or inserts.

However this logging is of no importance to the user, so I only want to process the data/logs after the page is completed for the user.
As of now, if I process the data while the page is loading, I go from 1.4 to 2.0 speed (server side time processing of code), which is quite a bit comparing it is of no use to the user.

So I want this code only executed after that the page is complete.

I've been checking out Ajax, async pages etc, but the problem is it still gets executed before the page is rendered to the client, which means the client will have to wait longer then it is not being processed.

I've been checking out Threadpool.queueBackgroundWorker, however if I get it correct, this will still be executed before the page is shown to the user, as it has to complete before the prerender.

Then I thought about creating a new thread, and do the processing there, which would not have my page waiting to complete the data/logging.
However when I have 100 or 200 users loading pages at the same time, then that would mean I would be creating 200 threads on those loads, which I doubt will be good for performance. So if I want to solve this, I would have to create my own threadpool and only assign for example a max of 40 threads to it which can pr

Blank Managing My Links Page for Just One User



I've got a single user who's not able to manage his links in MOSS 2007. The links I speak of are gotting to via http://<<your:mysite>>/_layouts/myquicklinks.aspx. Other users have no issue.

I read somewhere that this might be caused by the user in question having added an improperly formated link. My issue is how can I check for that condition and correct it? Any thoughst would be much appreciated.





User Control not accessing the value of the properties send to it from the aspx page.


I have a dynamic accordion on a page. Set its datasource to an object of paged data source.The user control is in the accordions content template. When i was writing code the properties were showing but after giving the values of databases as


<uc:UserControl1  runat="server" Property1='<%#DataBinder.Eval(Container.DataItem,"columname1")%>' Property2='<%#DataBinder.Eval(Container.DataItem,"columname2")%>'  ></uc:UserControl1>


but the values shows null, these properties are shown as textboxes text property by user control.

MoreOver when I checked the values of database Items.So i made a textbox instead of usercontrol here as

<asp:TextBox ID="txtTest" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Columname1")%>'></asp:TextBox>

It is showing the correct value. And if i pass the value directly it is also showing correctly like

<uc:UserControl1  runat="server" Property1="XYZ")%>' Property2="ABC")%>'  ></uc:UserControl1>

. where I am wrong

the problem is eval is not passing the value to usercont

output cache to be used only when parameter has changed + old question of user control not answered



i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :


and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?

How show the computer user into a label in a master page

  Hello all, I'm creating a web site and I have this question, I installed a label with the name Userlbl in the master page, and the idea that I have, is when somebody opens the website, the label shows the computer's user, in my case Welcome: "Charly_csh" I tried with this code, that I used before in access and it works, when I load the page on the localhost, but when I load on the server, it shows NETWORK SERVICE The code is this: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Userlbl.Load Dim wshNetwork As Object 'New wshNetwork wshNetwork = CreateObject("WScript.Network") Me.Userlbl.Text = wshNetwork.UserName wshNetwork = Nothing End Sub Does somebody have an idea???       

TypePerf, Buffer Cache Hit Ratio, Page Life expectancy and some other counters....

Hello, I 've scheduled a Task on a Windows 2008 R2 Server (a Blade with 2 Processors (6 core HT) and 18 GB RAM) to check some SQL Server 2008 Performance Counters. The task runs TypePerf that checks the Counters every 15 seconds for 10 minutes. The task is scheduled every hour. The strange result is that Buffer Cache Hit Ratio, Page Life expectancy and some other Counters are ALWAYS = 0 but if I run PerfMon, Buffer Cache Hit Ratio is 100 and  Page Life expectancy >>>> 300. Any Idea? Thank youLuca Bovo MCTS - MCITP SQL Server 2005 (Database Administrator and Database Developer)

Log Cache Page size

Hello: trying to get more details about Log Cache. i am aware that Data page size is 8KB. want to know the size of page in Log Cache, as i am not able to see that inofrmation in BOL & at MSDN. Any link or pointer is highly appreciated. Thanking in advance. Thanks

Long execution times for Search pages even after 4th or 5th user has accessed the same page.

Hi Guys We have a Sharepoint 2010 farm with two NLB web fronts ends, a Index server and a two box SQL cluster. The same problem also occurs on a dev box which has Sharepoint 2010 and SQl server running on the same single box. When a user access the search or advanced search page we get long execution times of between 15 and 30 seconds.  The strange thing is that the user will have a slow response the first time, then they are fine for a period of an hour or two and then they hit the slow response again.  Below i have copied info from the developer dashboard.  Does anyone have a suggestion of where to start tackiling this issue. Thanks 1st Run.  (Note this site was accessed by 3 other users first) BeginRequestHandler (0.05 ms) PostAuthenticateRequestHandler (0.06 ms) PostResolveRequestCacheHandler (18.48 ms) GetWebPartPageContent (16.87 ms) GetFileAndMetaInfo (15.57 ms) GetWebPartPageContent (35.25 ms) GetFileAndMetaInfo (34.99 ms) GetWebPartPageContent#1 (89.27 ms) GetFileAndMetaInfo (89.06 ms) Add WebParts (3975.17 ms) Search Box (3974.54 ms) SearchBoxEx.OnLoad (15426.56 ms) SearchBoxEx.HandleContextualScoping (0.01 ms) UserPreference.GetUserPreference (15418.52 ms) UserPreference.GetFromCache (0.04 ms) SearchServiceApplicationProxy.GetUse

Customize the User Profile page

I need to add a "link" or "button" to the User Profile page (userdisp.aspx).  In SP2007, I had a custom feature that would forward the user to a custom aspx page, but that doesn't appear to work in 2010.  Is there a recommended method of customizing the User Profile page in 2010?

How to Create a Curriculum Vitae For every user on there profile page?

Hi, I have to create a Curriculum Vitae on everyones users profile page so they can fill it in and afterwards we can do searches on it to see the experience of our people. This has to be done in a webpart. All ideas are welcome... i have no idea how i need to start on this.. i was thinking of making a list and saving all data of everyuser in the list (but if i put a webpart on the profile page i guess i will only have 1 list for all users or not?). Or maybe creating a wiki with all the userprofiles and then a webpart that query's the wiki.. but will the search work then?   What would be the best sollution?  I'm working with sharepoint 2010 Enterprise Thanks a lot!!!   TIM

Object Cache: The super user account utilized by the cache is not configured. This can increase the

Hi im having the following error in the windows event viewer Object Cache: The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unneccesary system resources.  To configure the account use the following command 'stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl'. The account should be any account that has Full Control access to the SharePoint databases but is not an application pool account.  Additional Data:  Current default super user account: SHAREPOINT\system after this the computer starts working slowly and slowly The account that the log shows is the aplication pool account of the first site collection I created   I followed the instrucctions in this link: http://technet.microsoft.com/en-us/library/ff758656.aspx I set new accounts to the superuser and super reader I also tried using the same account that the first error showed has superuser and super reader However  I always get this error when I try to access the Site Collection after performing this The user does not exist or is not unique.<nativehr>0x81020054</nativehr><nativestack></nativestack> In the sharepoint log I get this same error plus this Could not get token super user token, reverting to system account.&

Object Cache set with Portal Super User accounts. Access denied to site.

I have the same issue on multiple farms. In this example i'll outline this problem for a three tier farm. SharePoint web server SharePoint Application server (hosts central admin) Sql server After installation and configuration i have created two web applications (claims based auth with NTLM). https://portal.contoso.com https://mysite.contoso.com The client connects on the URLs to the web server (1st tier). All is working correctly and they can access the portal and their mysite. The log file keeps reporting that i need to configure the user accounts for the Object Chache. So, i looked up the required steps and executed these conform mcrosoft guidelines (http://technet.microsoft.com/en-us/library/ff758656.aspx) All the steps run seccesfully. But when i connect to the URL i now get an access denied (even with the administrator who is site collection administrator) In the log file i get the following to lines when i connect to the site. Unknown SPRequest error occurred. More information: 0x80070002 Unknown SPRequest error occurred. More information: 0x80070005 I have exact the same issue on two other farms. Marc

Redirecting to custom page while clicking on the user/group browse button

Hi, i have created a custom visual web part in visual studio 2010 and i deployed it into sharepoint site by creating a new page in my site. The custom page gets the data of users/groups from database and pass the users to the people picker in sharepoint.Here my question i have a document library where we upload document and get the users page popup that consists of people picker and a user/group browse button.when i click on the (book image button)browse button it will redirect to the user and group search page but here i need to replace my custom  user/group search page with the default one so please help me how to redirect to the custom page by clicking on the user/group browse button,and i need to pass the selected users to the people picker text box........please give me some solution whether this can be done or not if possibe please send me the link or some sample code how to do this   thank you.

How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx)

I have a parent .aspx page that has a asp:panel control in it, and this parent .aspx is also referencing a user control that I registered in that .aspx. Lets just call it usercontrolA.ascx for this post.The user control has a radiobuttonlist itself.Based on a selection from the radiotbuttonlist in the user control, I want to be able to hide the asp:panel in my .aspx (parent) but unfortunately I cant' get it to work:parentPanel.visible = true;  <<< I trried this in usercontrolA.ascx.csBut the user control doesn't know about the panel in the parent .aspxSo do I need to expose that somehow from the parent so that I can access it from the code behind of the child .ascx?  How?

how to redirect user to login page if session is null

i have 2 page,1.login.aspx ---  2.welcome.aspxin my login.aspx im storing username into sesssion as below:Session["usernm"] = txtUsername.Text;in my welcome.aspx  pagein page_load event if (Session["usernm"]==null)        {            Response.Redirect("Login.aspx");        }----- here if i manulally paste the url ( http://localhost:4125/Loginado/welcome.aspx) it should go to  login.aspx for user credentialsbut its going directly to welcome.aspx  page.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend