Sliding Expiration In Web App Using Claims From STS

Jun 8, 2010

1) How/where do I set the lifetime of the session cookie in my web application when using an STS to get claims? From what I can tell, it seems I can only do this programmatically in the erviceConfigurationCreated event.

2) How/where can I make sure that the expiration is sliding?

View 1 Replies


Similar Messages:

C# - Caching With Sliding Expiration In .NET Page Methods?

Mar 5, 2011

I know that when declaring a page method in ASP.NET, I can specify a CacheDuration like so:

[WebMethod(CacheDuration=60)]
public static void Foo()
{

But from what I understand, CacheDuration only supports absolute expiration. I want to have sliding expiration. So that leads me to believe that I need to access the System.Web.Caching.Cache object somehow. But, since page methods are static, and this is essentially a standalone web service, I'm not sure how to access it statically. The only ways I have seen on Google rely on getting it from the HttpContext. But, there is no HttpContext available to me here, right?Or, do I need to use the System.Runtime.Caching.MemoryCache to do my own caching?

View 1 Replies

State Management :: Authentication Cookie Expiration Not Sliding Properly?

Mar 28, 2011

we have a web based application that let users register, activate their account and then login to use the app...

it is very important that accounts must not be used simultaneously, so if user a is logged in using mynameisA/mypassword, no one else can login at the same time using the same credentials, until he logout.

this was achieved by using a cache mechanism that inserts an entry specific to that user and will keep on refreshing at each request, until the user logouts, where we remove that cache entry. on login, we check whether that cache entry is there in order to allow him in or throw a message saying that the user is already logged in... we use enterprise library 5.0 which we found more reliable than the asp.net cache, and for various other practical reasons.

now, this works fine, but the problem is that it seems like the authentication ticket and cookie doesnt slide properly at each request. so sometimes, users end up logged out because their authentication ticket got expired, and they cannot login again because the cache entry is still there.

here is the code in the sign-in page:

' if user credentials are valid, and other checks and validations...

[Code]....

here is the code that runs on every authenticated request (httpmodule):

[Code]....

and here is the web.config stuff:

[Code]....

we've done all kind of tests including metabase IIS6 monitoring. there is no apppool recycle happening...

checking the authentication cookie in firefox view cookies option shows that on each request, the expiration time of the authentication cookie is not sliding.

View 7 Replies

C# - Thread.CurrentPrincipal Claims Incorrectly To Be Anonymous?

Aug 30, 2010

I'm seeing requests on my server that appear to be made by an anynomous client, although I'm certain they were made by an authenticated user - I have fiddler logs showing that the client sent valid asp.net auth cookies, and server logs indicating that the cookie arrived and is valid. The problem has been observed across all browsers.

The flow of data is:

User visits login url, on a machine that's part of a webfarm (all with the same machine, decrypt keys)On successful forms authentication, user is redirect to a restricted url, their homepage Homepage renders correctly, knowns the identify of the user, and includes javascript to perform 7 asynchronous post-backs to get additional data Javascript kicks off 7 http.get requests, hitting different machines in the webfarm (assume round robin)Server validates request: ~0.01% fail to authenticate.

Now into details:

A very small number of the asynchronous requests land at my server (with evidence they were not manipulated or faked) and appear to be anonymous. Of the 7 requests made, some number may or may not work (ie, 5/7 will succeed, 2 will fail). There doesn't appear to be any patterns in success / failures. In the cases where my requests appear to be anonymous, the CurrentPrincipal.Identity records:

Thread.CurrentPrincipal.Identity.IsAuthenticated; // false
Thread.CurrentPrincipal.Identity.Name; // null (or empty, unsure off hand)

Dumping the http.context.request.params collection to a log file, I'm able to see the following relevent (and scrubbed) properties (complete params below):

[code]...

View 4 Replies

Custom Server Controls :: Table-Layout Attribute And MSDN Claims Re Capabilities?

Aug 30, 2010

I am developing a CompositeDataBoundControl that is basically a 'table' inside a 'div', in order to limit the size of the Control and use the scrolling capabilities of the 'div' tag ('RenderBeginTag("div").

So essentially the control is;
<div style="overflow:auto;width:400px;height:300px;">
<table style="table-layout:fixed;">

[code]...

View 3 Replies

Use Jquery For Sliding Effect?

May 21, 2010

I am new to javascript and jquery. I have written some javascript code for some client validation.

document.getElementById(spnError).style.display = 'block';

This is how I am showing a span if there is some validation issues in the form. I want to use Jquery to show this span. I would like to slide it down slowly.

View 2 Replies

AJAX :: Sliding Images In And Out?

Dec 28, 2010

I have been exploring for a few days AJAX Toolkit and I am just wondering, if it is possible to move images in and out e.g. from right to left from asp.net image control. I would like to create a control that behaves in a similar way to the ones appearing on MS Store websites which you see there:

[URL]

I have tried to create it using AJAX SlideShowExtender but to be honest I am new to this technology and managed to make it only fade in and out. I was thinking also about using Collapsible Panel Extender but obviously I am not sure where to start.

View 2 Replies

Sliding Panel In A Table?

Aug 12, 2010

I want to display in my web page couple of show times and the list of movies under it.The display would be like this -

Show Time 6.30 PM

Movie 1
Movie 2
Movie 3

Show Time 9.30 PM

Movie 1
Movie 2
Movie 3

I want to display it in such a way that when I Click on "Show Time 6.30 PM" it would display the movies under that show and wont display anything under "Show Time 9.30 PM". Now when I click on "Show Time 9.30 PM", all the contents inside "Show Time 6.30 PM" should shrink and the list of movies should be available in "Show Time 9.30 PM".I need some idea on how to do this, will it be achieved using a sliding panel, or is there any other control.Note - For the show times and movie details I have a collection which I am binding it to a repaeter control.

What I am looking is for a SINGLE sliding panel which floats around every row in the table, So if Row 1 is clicked the panel displays the show times under it, when Row 2 is clicked, the data inside row 1 Is shrinked and the panel floats to down displaying the movies under Row 2.

View 2 Replies

VS 2008 How To Do Auto Site Sliding

Sep 27, 2010

I use my web app on the wall as a dashboard type scenario. One thing that would look great would be to automatically move between pages on my site (and maybe others) after a certain time. For example, you setup page x for 2 mins, then page y for 2 mins then page z for 4 mins. Now, I can do this easily inside my existing website. However, I would like to be able to switch to other sites with login where required. So basically a website of its own that just diverts according to a script. Has anyone seen anything like this on the market or have concepts similar?

Note, my webspages are ajax-ified so any timers would not be allowed to interupt updated.

View 5 Replies

Is NHibernate SysCache Absolute Or Sliding

Feb 7, 2011

I think the question says it all, but I'd like to know for sure.

View 1 Replies

AJAX :: Use Form Sliding In Masterpage?

Sep 14, 2010

How to use form Sliding in masterpage?

View 1 Replies

MVC :: Implement A Sliding Pager In Helper?

Feb 6, 2010

How can I implement a sliding pager in asp.net mvc helper? Take Google pager for example.I've managed to create a pager like this: <previous> current: 9 of 50 pages <next> but I need something like:current: 9 of 50 pages <previous> 4 5 6 7 8 9 10 11 12 13 14 <next>

View 4 Replies

Web Forms :: Implement Sliding Panel

Dec 3, 2012

i wish to show a slide panel on webpage.

View 1 Replies

AJAX :: Nested Ajaxtoolkit Accordion Not Sliding

Nov 13, 2010

I am creating a nested accordion in the code behind which is populated from my data table. The requirenment is

1. Main Accordin - create department Panes

2. sub accordin - Each department pane has a accordin in the contnet are.

3. sub accordin panes - people from that department show up as panes in sub accordin.

I was able to impelment this model but the problem is that the sub accordin ( with people) would not slide. First one is opened by default and i see hand on the other header panes but they dont slide (up and down). They do have a content though. P.S - if i implement the same nested according in aspx it works fine. My code

[Code]....

Update - I found that I get "Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.Parameter name: element" javascript error when i try to create the nested accordin.

[Code]....

View 1 Replies

Jquery Cookies - States Of Sliding Panel Doesn't Work

Jan 5, 2011

I have a little problem with my sliding panels, I have a Page with 2 sliding panels (right and left). These panels have a 'slide button' and you can reduce panels by clicking on it. I use cookies to record state of panel, so when you change page panels stay collapsed or extended. But it doesn't work very well, in fact the state is recorded for the page. If I change page, panel will extend (default position) but if I go back on the page it will disapear. Is it possible to ignore the path in the cookie and use a cookie for all website?
Jquery code :

$('#rightfold').click(function () {
if ($('.menudroite').is(':visible')) {
$('.menudroite').hide("slide", { direction: "right" }, 400);
$.cookie('rightfold', 'collapsed');
$('.triggerdroite').animate({ backgroundColor: "#B2C9D1" }, 1000);
$('#rightfold').animate({ color: "#000000" }, 1000);
}
else {
$('.menudroite').show("slide", { direction: "right" }, 400);
$.cookie('rightfold', 'extended');
$('.triggerdroite').animate({ backgroundColor: "#6c7a7f" }, 1000);
$('#rightfold').animate({ color: "#d9f4ff" }, 1000);
}
});
$('#leftfold').click(function () {
if ($('.menugauche').is(':visible')) {
$('.menugauche').hide("slide", { direction: "left" }, 400);
$.cookie('leftfold', 'collapsed');
$('.triggergauche').animate({ backgroundColor: "#B2C9D1" }, 1000);
$('#leftfold').animate({ color: "#000000" }, 1000);
}
else {
$('.menugauche').show("slide", { direction: "left" }, 400);
$.cookie('leftfold', 'extended');
$('.triggergauche').animate({ backgroundColor: "#6c7a7f" }, 1000);
$('#leftfold').animate({ color: "#d9f4ff" }, 1000);
}
});
// COOKIES
var leftfold = $.cookie('leftfold');
var rightfold = $.cookie('rightfold');
// Set the user's selection for the left column
if (leftfold == 'collapsed') {
$('.menugauche').css("display", "none");
};
// Set the user's selection for the right column
if (rightfold == 'collapsed') {
$('.menudroite').css("display", "none");
};

View 2 Replies

How To Set Expiration To Image

Mar 3, 2010

I'm creating image (jpg) at run time in my application (ASP.NET/C# 3.0). I need to delete the created image after 30 mins. So is it possible to set expiration to the image after 30 mins when creating the image like setting expiration to cookies.

View 3 Replies

How To Set Email Expiration

Jul 1, 2010

I'm programatically sending an email and I want to set it to expire after a certain amount of time. I tried using the following but it doesn't seem to work:

message.Headers.Add("Expires", Now.AddMinutes(2))

I can see the value in the header but the email doesn't actually expire.

View 4 Replies

MVC 2.0 TempData Expiration?

Jul 3, 2010

What happens in Asp.Net MVC 2.0, when next request does not come ever to retrieve value from TempData. Is it stored permanently or expires?

View 1 Replies

Security :: Claims Based Authorization VS Role Permission Based Authorization?

Apr 26, 2010

Our team has recently implemented a role permission based authorization so that we can have granular control. This is similar to what Rockford Lhotka suggests herehttp://www.lhotka.net/weblog/PermissionbasedAuthorizationVsRolebasedAuthorization.aspx I have also read about the Claims based authorization which to me looks very similar to what we have. Can some one put in simple terms what the advantages of claims based authorization are.

View 1 Replies

Security :: How To Set A Trial Expiration

Aug 12, 2010

I am not sure if I am asking this question correctly. Sometimes when you don't know enough, you may not know what to ask. I want to set up memberships with an ASP.NET website. The memberships will have a 14 day free trial period. After that, the user will need to pay a fee if they wish to continue to access the website. I am not sure how to accomplish this. After adding a membership database to the website, setting up roles ect., what do I do next? Do I need to make adjustments to the tables of the database, or write some code somewhere in the application? I have never done this exercise before, Logically, I know that I need to implement something that keeps track of expiration date. Also, how do I prevent a user from just making up new user names and credentialing?

View 4 Replies

What Happens When A HttpCookie Expiration Has Been Crossed

Mar 26, 2010

I am creating some cookies in my ASP.NET application. These cookies expire 10 minutes after they have been created. I follow the approach described on MSDN as shown here:[URL]

My question is, when a cookie "expires", what happens? Does the browser automatically delete the cookie? Is it our responsibility as developers to remove the cookies if they exist and have expired?

View 2 Replies

C# - To Realize Auction Expiration

Mar 3, 2010

How to realize auction expiration? Make it inactive after 1-3-5 days? Something like eBay?I am using asp.net c#.I have "active" boolean field in my auction table.

View 1 Replies

.net - Page Expiration After Postback?

Mar 11, 2010

I've been doing web development for a while and have yet to read a good answer to this question: iven a page that executes transactions through a postback, how do you prevent the user from duplicating the transaction when they do something as simple as hit the back button? I've explored trying expire the cache but I must admit I'm lacking in my understanding of ASP.NET caching. What is the approach I should use to make the old request stale and invalid?

View 2 Replies

How To Set Cache Expiration For Javascript File

Jul 5, 2010

I have asp.net application. I'm using external javascript files in my application. When I test my site with page speed tool from google it says that following resources are missing a cache expiration. also some of the images and css files.

View 2 Replies

Web Forms :: Content Expiration For Certain Pages?

Jan 19, 2010

I am in need for setting content expiration to immediate for certain parts of my website. Basically we want to expire the "shopping" pages but the browsing pages shouldn't expire allowing users the ease of using the back button to browse around. Is there a way to enable it per page, master page, folder, or something?

View 1 Replies







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