State Management :: Data Caching C#.net

Aug 20, 2010

I have a large SQL Database in the server from which I can create a dataset of about 10000 rows. My question is about caching this data. Which type of data caching should I choose (Server side or Client side)? Which one will provide better performance?

View 5 Replies


Similar Messages:

State Management :: Partial Page Caching (user Control Caching) And Button Events?

Jun 14, 2010

I have a page with a number of user controls, In one of my user controls I have a button event. I turn on output cache for the user control that has the button and vary by control using the ID property of a hidden field control in the user control. whenever I turn on the output cache my button event doesn't fire.

View 2 Replies

State Management :: Caching A List Of Data?

Jul 26, 2010

I have a List (Table) of Data that I display in a Grid View. For now lets just assume I have a List<CustomObject> cList that I give to my GridView.DataSource(). I have a AJAX call (from a DropDown on the Page) that enables me to filter the Data in the GridView. This works. For now, I re-fetch the data from the DB, and filter it.I am wondering if there is a more efficient way of doing this i.e. to save the data the first time I get it, and then display a filtered list of that data when requested. I attempted to save the data as private variable on the Page, but it seems that Page gets recreated for the AJAX call. My attempt looks like:

[Code]....

[Code]....

This page is accessible anonymously - so there is no User Profile or something like that. P.S. I put my code in the Insert Code Dialog, but it does not seem to format it correctly. Sorry about that.

View 2 Replies

State Management :: Caching The User Control Data Based On Multiple Parameters?

Feb 10, 2011

i have a usercontrol called navigationmenu whose data is static but varies with loged in1.empID 2.empType 3 Country my question is how can i cache the data of usercontrol based upon combination of these 3 parameters

View 9 Replies

State Management :: ObjectDatasource Caching

May 21, 2010

I have an issue with the object datasouce caching. Users are seeing other peoples cached records when they click next on the grid. It looks as though the caching is shared among users. Bascially when the user get to the screen they have date filters so they can further filter down the records. If another user it in at the same time and the first user hits next they get the second users filtered records.

View 3 Replies

State Management :: Caching With A Web Garden?

Mar 22, 2011

Does ASP.NET provide any sort of out-of-process cache server, similar to the way the session server works? If not, what would you recommend for caching in a Web Garden scenario?

View 3 Replies

State Management :: How To Do Conditional Caching

May 31, 2010

I want to cache a page with specific value of specific querystring using SqlDependency.

I found with VaryByParam
= "ProductId,CategoryId" I can do that but I want to cache the page only if ProductId is 10 and / OR CategoryId = 15 for example.

How to do this?

View 3 Replies

State Management :: Using Caching While Storing Variables?

Jun 1, 2010

I've begun building a bit of a framework that I wouldnt mind working with. The idea is to create a framework that makes it even easier to create CMS addons (So basically a CMS framework).

One of my goals with this project, was having all modules made within the framework automatically support version without any extra coding.

More to the point, the way that I started building this, many pieces (Lots had to do with the versioning system) became interlinked. A version Object in the code related directly to a Module Object and vice versa, therefore the class definitions for each relate to eac otherh. (So having only the Module object, i could access the versioning object and all of its properties). My issue with this is of course what happens if i have both the module and versioning objects in my code simoultaneously, resulting in having not just duplicates of the data within the code, but (perhaps) infinite amounts, killing the app.

So what im wondering is, what if my modules properties where stored within the cache? Ie if i had the Module object, and it had the property ID -- Then the data for ID would be stored in the cache within the module object. Referencing the value simply retrieves the value from the cache if it exists there, and the SQL database if it doesnt. This way, all instances of the module that may be running at the same time will have access to the same information, at the same time, and hopefully causing it to use less space in total.

I would then add a function, so that if a developer was loading a rarely used module, or dident want to occupy cache space with large amounts of data, then they could just call a Dispose function that would remove the data from the cache.

Does this method sound reasonable? I know this probably isnt what the cache is designed for -- but I cant think of any other way to do this without having an infinite loop of objects referring to each other, or causing huge discrepencies from having different instances of objects referencing values that should be the same, but arent because they are technically different instances.

[Code]....

View 1 Replies

State Management :: Using SqlCacheDependency With Output Caching?

Apr 9, 2010

Iam adding SqlCacheDependency programmatically but Iam not able to invalidate the cache.

Iam using the following Output cache directive in the .aspx page

[Code]....

The code in the .aspx.cs file is:

[Code]....

View 1 Replies

State Management :: How To Overload On Server Due To Caching

Aug 10, 2010

I have found this question in interview questions

"If i store cache in server the server will over load because of cache objects so how can i prevent that?"

View 1 Replies

State Management :: Caching With Static Classes?

Jul 3, 2010

Currently I have my data cached in Datasets in a static class. I was talking to my cousin's husband, who works as a C# developer for our local Telecom company.

Basically, I'm pretty new to ASP.NET and although to me having cached data in a static class makes sense to me, when I talked to him about it, he said there might be a problem when the site goes live, as on a web server more than one instance of the class may be created.

He did say this was a theory, and it was an area he didn't know an awful lot about, so I thought I'd ask some of you ASP.NET gurus to see if what I've done is totally wrong or not.

View 12 Replies

State Management :: Caching Aspx Page?

May 19, 2010

how can i cache aspx page?

View 2 Replies

State Management :: How To Implement Caching To A Dropdown List

Dec 3, 2010

How to implement caching to a dropdown list

View 2 Replies

State Management :: How To Use Caching For Frequently Communicating To Database

May 18, 2010

i want to use caching in my application

bcz i am depending on same data and in diffrent places i am communicating with database for this data

so i want to use caching and want to store this data after use login into application.

View 2 Replies

State Management :: Best Practise For Caching Objects For A List Of?

Dec 7, 2010

I've created a blog for my first asp.net website. Ive got a blog class as my object. Ive created a number of methods to access my blog articles using LINQ to SQL.

Each method returns a list of objects ready to be used in the appropriate web user control.

In my head i need to cache these lists of objects that are returned, but need to know the best way of approaching this. So i have come up with two possible options

1: Make one method to retrieve all blogs in a list<Blog> and cache this list to be used for all other methods or

2: Cache only the required methods that really need it.

View 3 Replies

State Management :: Where Is The System.Web.Caching.Cache Actually Stored

Nov 25, 2010

I am using this to store my user information for authentication. I'd like to know where this is actually being stored? I know that people suggest to store the Session state in SQL. Is this necessary for the Cache as well?

View 4 Replies

State Management :: Caching Implementation On The Basis Of Session?

Mar 2, 2011

in my web appliaction there are many pages which use data from backend . and all these pages run according user login in application.every user gat different data according data availability for particular user .And data is not static for user in database it can be update ,delete,and may be new data inserted for user, frequently . in this case roundtrip for data on sql serverv increased and it cause of load on sql server. in this csae i want to implement caching on my pages. But I am not able to do this because i have no idea about how implement caching on the basis of particular user data .

View 10 Replies

State Management :: Storing Large Data In Session State?

Sep 18, 2010

We have a scenario where we need to store large tables of data on Session in asp.net page. on a highlevel we have to store following data

1> A table (table 1) with 1000 rows and 8 to 10 columns.

2> A table(table 2) with 500 rows and 8 to 10 columns (actually user can add the data from table 1 to table 2, so as user keeps on adding from table 1 we remove the data and put it in table 2)

3> Another table(table 3) with 1000-1200 rows each having 3 columns.

We are having a webfarm, so we need to store it in either SateServer of Oracle DB,What would be the performance implications of storing such huge data on the server.

One more thing is at any point of time max of 70 -80 people will be accessing our website, so will this cause any performance degradation?

View 7 Replies

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in asp.net

View 2 Replies

State Management :: State Management Using Shared Class?

May 29, 2010

I am doing a POC of making my website run faster. Currently it stores huge object data in Session while passing information from one page to another. What I was thinking is to use shared methods and properties instead of session. It works, but wanted tocheck if this is an optimum way to do it. Below is the code that does not use session but still pass object data from one page to another:

[code]...

View 1 Replies

State Management :: State Management And Page Navigation?

Nov 18, 2010

i have a form on page1.aspx with several controls (textbox, dropdownlist, etc).on Page1 PageLoad event i load data from database and performe databinding.From Page1 a user can, by clicking a specific button, move to Page2.aspx to insert some details and, after saving details, he returns to page1.

if save changes are made on control on page1 before save them to db, obviously, these are lost on return from page2 (because are reloaded on pageload from db).How can i save control status between pages round trip?

View 3 Replies

State Management :: Get The Correct Concept For State Management?

Aug 16, 2010

i need to know the full concepts state manegemnt in asp.net,..in which site i will get the correct concept for state management....

View 4 Replies

State Management :: Application State And Session State?

Oct 2, 2010

User Interface: 2 Labels; 1 Buttons

Requirements: Create a Web Page in ASPx that will do the following:

1)One label will provide a count of how many times Button 1 has been clicked in the current session.

2)One label will provide a count of how many times Button 1 has been clicked by all users of the application. The Application Code for the Button should start at 100 (set this in the Global.asax file). this is what i have so far but i cant seem to get the application state to work properly.

aspx.vb

Partial Class _Default
Inherits System.Web.UI.Page
Dim clickcount As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Session("ClickCount") Is Nothing Then
clickcount = 0
Else
clickcount = CInt(Session("ClickCount"))
End If
If Not IsPostBack Then
If Request.Cookies("UserName") IsNot Nothing Then
Label1.Text = "Welcome Back " & Request.Cookies("UserName").Value & "."
End If
End If
Dim clickCounta As Integer = CInt(Application("ClickCount"))
End Sub
Protected Sub PostBackSession_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.Click
clickcount += 1
lblClkCnt.Text = "Current Click Count is " & clickcount
Application.Lock()
Dim clickCounta As Integer = CInt(Application("ClickCount"))
clickCounta += 1
Application("ClickCount") = clickCounta
Application.UnLock()
AppClick.Text = clickCounta
Dim nameCookie As New HttpCookie("UserName", _
TextBox1.Text)
nameCookie.Expires = Now.AddYears(1)
Response.Cookies.Add(nameCookie)
End Sub
Protected Sub PostBackSession_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.PreRender
Session("ClickCount") = clickcount
Application("ClickCount") = clickcount
End Sub
End Class
global.asax
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(Application("ClickCount"))
Application.Add("ClickCount", 0)
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(HttpContext.Current.Application("ClickCount"))
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub

View 3 Replies

What Version Of .NET Supports Using Windows AppFabric Caching For Session Management

Aug 25, 2010

I would like to know the version of ASP.NET supports using Windows AppFabric caching for session management or is it just about using the AppFabric session provider

View 1 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved