Can The Absolute Expiry For A Cache With CacheUpdateCallback Be Smaller Than 20 Seconds
Jan 20, 2010
I have the a test harness detailed below. This has two labels on the page that are set within the page_load which is hit every second due to the updatepanel and timer.
Label1 is set to a datetime value that is stored in the Cache. Label2 is set to the current datetime.
The cache is set with an absolute expiry of 5 seconds from now and there is an update callback on the cache to re-set the datetime and make it valid for another 5 seconds.
The problem I have is that I'm seeing the cache update every 20 seconds, not every 5 seconds like I would expect. If I set the time to 30 seconds then it updates every 40.
This appears to indicate that the cache will only expire every 20 seconds. Does anyone know of a way of reducing this time? If I just insert into the cache with an expiry of 5 seconds and no Callback then it works as I would expect and is removed every 5 seconds.
ASPX:
[Code]....
View 1 Replies
Similar Messages:
Nov 26, 2010
I have added a list to the cache with an expiry date, however the expiry date doesnt work, im not sure how long the cached item lasts but its no more than a day.
[Code]....
View 5 Replies
Jan 15, 2010
I have a database that I just migrated data to. It has grown to 769MB from 13MB when I shrink it, it does not get any smaller. I don't think the amount of data should have made it grow that much. Could I be doing something wrong?
View 3 Replies
Jul 24, 2010
The asp.net chart control (pie) is becoming smaller and smaller as I add more and more legend items. How can I prevent this? If I set the maximum space that the legend can take, items are getting truncated. Therefore, I want to find a way to dynamically set the size of the chart.
View 1 Replies
Mar 19, 2010
Ive downloaded AspNetAjaxLibraryBeta0911 and have added both System.Web.Ajax.dll and AjaxControlToolkit.dll from the webforms/debug folder to my [ASP.NET web app] project. I have also added the latter dll to my toolbox. Ive dragged a ToolkitScriptManager onto my aspx page too, and it has created these two reference:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.Ajax" Namespace="System.Web.UI" TagPrefix="asp" %>
Is that right so far? Now I want to have a custom HTMLEditor, so I created a new folder "App_Code" and created a class calles CustomEditor.cs which has this content:
using AjaxControlToolkit.HTMLEditor;
namespace TestProj.App_Code
{
public class CustomEditor : Editor
{
protected override void FillTopToolbar()
{
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Underline());
}
}
and then I added this to the aspx page:
<%@ Register namespace="TestProj.App_Code" tagprefix="custom" %>
and
<custom:CustomEditor ID="editorMsg" runat="server" />
Firstly, it works. But I have a few problems.
1) In CustomEditor.cs there is no intellisense, and pressing Ctrl + Space bring up no things like "TopToolbar" etc.
2) In the aspx page's designer code I had to add this manually: protected global::AjaxControlToolkit.HTMLEditor.Editor editorMsg; else it wouldnt come up in my code behind. Why isnt it automatically doing that? And is that correct?
3) No matter what I do I cannot make the editor's height smaller than 200px. I set it both inline and in code behind but it still overflows its container and goes to 200. I can however make it more than 200 and also width is fine. Heres a screenshot: [URL]
View 6 Replies
Jan 8, 2010
I have three panels like so:
___ _________ ___
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|___| |_________| |___|
But if I shorten the window a little bit, the middle panel goes below the two side panels:
___ ___
| | | |
| | | |
| | | |
| | | |
|___| |___|
_________
| |
| |
| |
| |
|_________|
Here is my code
<style>
.SidePanel {
background-color:#9999CC;[code]....
View 3 Replies
Nov 30, 2013
I have two textbox as naming : txtInitiateDt and txtDisposalDt.
When user give 2nd textbox value from datepicker it should chk whether the given value shouldn't more than to date and also less that 1st textbox value.
I did it & also works good...bt there's an error arise when i host the site on client machine where only framework and database is present.
And the error is "String Value is not in correct dateformat" and fr this exception other events are blocked.
View 1 Replies
Feb 18, 2010
is it possible to add an expiry date to a PDF with asp.net when someone downloads a file?
when the user downloads a file it will be usable until a set date when it will become useless and they will have to download a fresh version.
View 1 Replies
Feb 26, 2015
this is my css for the mobile version I was just wondering how I can change the size of the textboxes for the mobile version to make them smaller but don't change on the computer version? if you go here on the mobile version youll see what I mean URL... the code for the form is inside this class tag.
<section class="left-col">
</secion>
PHP Code:
/*--------MEDIA!!!-----------*/@media screen and (max-width: 478px){ body{
font-size: 13px; }}@media screen and (max-width: 740px){ nav {
width: 100%; margin-bottom: 10px; } nav ul{ list-style: none;
margin: 0 auto; padding-left: 0px; } nav ul li{ text-align: center;
margin-left: 0 auto; width: 100%; border-top: 1px solid #878E63;
[Code]......
View 6 Replies
Nov 26, 2013
I need to display alert message or alarm or any sound or indication when there is an expiry date for the products from the database table. It should be automatic by any windows or webservice...
I am using .net 2003 and ready to upgrade...
View 5 Replies
Feb 20, 2010
I need to create a user login/logout/Session expiry tracking page(ASP.Net).. It is obvious that I can invoke my tracking page when user logs in and logs out.. How do I detect session expirey?
View 3 Replies
Jul 23, 2010
In one grid there is only one column and entries are 100+, all entries are hyperlink entries, but the gridview does not look nice with one column and 100+entries, is there any way I can split that entries in 3-4 coluns to look even.
View 3 Replies
Aug 11, 2011
I have written a website and let the user upload their photo. It also resizes the picture to 400 x 400 and crops automatically to the center part of the picture. All of this works good but each file is about 355K each for JPG and PNG file formats. I just tried GIF and it is 49K but the picture is grainy when saved this way. Is there any way I can get the picture to a smaller file size with keeping it at 400 x 400? I really thought PNG would be the way to go and was surprised by it being the same as jpg. I don't want to lower the quality either for JPG files.
View 1 Replies
Jan 12, 2011
We need to validate the credit card expiry date using C#?
How to convert String("MM/DDDD" : "07/2011") to Datetime and compare with current date?
View 4 Replies
Jun 9, 2010
I'm using ASP.NET Session State to keep track of logged in users on my site. However, one problem I'm running into is that by default ASP.NET session cookies are set to expire when the browser closes. I've tried setting my own ASP.NET_SessionId cookie and modifying the cookie's expiry using something similar to the following code:
Response.Cookies["ASP.NET_SessionId"].Expires = DateTime.Now.AddMonths(1);
None of these approaches work, they all set a second cookie with the same name. Is there a way of changing the session cookie's expiry?
View 3 Replies
Nov 15, 2010
Using ASP.NET 2.0, with forms authentication.
Just for a test, I configured the roles cookie in web.config like this :
<roleManager enabled="true" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="2"></roleManager>
I wanted to see what would happen when the cached role cookie expired. Using Fiddler, after 2 minutes had elapsed, I could see that the raw value of the role cookie had changed.
I was expecting that on expiry, that ASP.NET would simply re-read the roles information from the database, and repopulate the cookie with the same value. So my question is, why would the raw value of the cookie change after expiry ? The cookie value is not human-readable (base 64 encoded and/or encrypted ?), so I can't tell if the information in it is the same, although the application still seems to work fine.
EDIT :
It looks like each time the roles are encrypted and cached in the cookie, it gets a different raw value.
e.g. if you run the following code :
RolePrincipal rp = (RolePrincipal) User;
string str = rp.ToEncryptedTicket();
Label1.Text = str;
View 1 Replies
Aug 20, 2010
is there any way to find out the reason for session expiry?
View 7 Replies
Feb 16, 2010
I am creating a content management system but there is one problem. What I want to do in my website is that when a user opens the website a new sessionid is created for that user, and when the user closes the website, the sessionid is cleared. How can I can do it?
View 3 Replies
Jan 18, 2012
I need to show a Warning message when a Product is about to Expire
or before the expiry date of product or atleast remind him before expiry.. like Reminders.
I am working on Web Development Project in Asp.Net , VB language ....
View 1 Replies
Mar 29, 2010
Is it correct to implement my caching object like this in my controller :
[code]....
And I Use it like this :
[code]....
View 1 Replies
Jan 30, 2011
The a way to save an object in session with expiry time , such as when you're saving object in cache.
View 12 Replies
Dec 25, 2010
how to set the cookie expiry time towards 20mins from the last request.
View 2 Replies
Feb 25, 2011
We have a wfc layer that wraps the business classes and database access and use a client that lives on the database layer. Amongst our group we are attempting to form standards. Some want to have the client call the web method and pass the page they are requesting and the page size. Pass that to the database and then page in SQL Server use RowNum.Some want to cache the full list of objects in http cache on the service tier and page in memory. They concern here is memory use on the server.
Which would be best for a medium number of users with potentially large number of records to manage (say 30K) Is it better to cache them all in memory and work from there or page at the database as the application scales?
View 1 Replies
Jul 28, 2010
What are the "optimal" parameters for creating an AppFabric cache when you will be storing session state in the cache? MSDN Cache-Related Commands
Powershell command line:
New-Cache [-CacheName] <String> [-Eviction <String>] [-Expirable <String>] [-Force [<SwitchParameter>]] [-NotificationsEnabled <String>] [-Secondaries <Int32>] [-TimeToLive <Int64>]
[code]...
Since I don't want my sessions to be removed unless the session has been abandoned either via code or Session Timeout...For eviction, I would think "None" and for expireable, I would think False.I have tested and calling Session.Abandon does remove the object from the cache. I have also tested to see if by extending my session, the session object in cache is also extended. This does seem to work the "correct" way.
View 1 Replies
Aug 1, 2010
We have a data driven ASP.NET website which has been written using the standard pattern for data caching (adapted here from MSDN):
public DataTable GetData()
{
string key = "DataTable";
object item = Cache[key] as DataTable;
[code]...
The trouble with this is that the call to GetDataFromSQL() is expensive and the use of the site is fairly high. So every five minutes, when the cache drops, the site becomes very 'sticky' while a lot of requests are waiting for the new data to be retrieved.
What we really want to happen is for the old data to remain current while new data is periodically reloaded in the background. (The fact that someone might therefore see data that is six minutes old isn't a big issue - the data isn't that time sensitive). This is something that I can write myself, but it would be useful to know if any alternative caching engines (I know names like Velocity, memcache) support this kind of scenario. Or am I missing some obvious trick with the standard ASP.NET data cache?
View 3 Replies