Does requesting a WebResource.axd extend Session andFormsAuthentication ticket?


D

daokfella

I created a little server ping control that can basically ping the
server at certain interval in the hopes of keeping a user's session
and authentication ticket alive on particular pages. I have a 1x1 gif
as an embedded resource. My javascript is easy enough, it changes
the .src property of an image every nth minute. The code is working
fine, However the formsauthentication ticket is still expiring after
20 minutes even though the new src was pulled at 10 minutes in. Does
the request to the webresource.axd update the session and auth ticket?
The root of the app is <deny users="?" />

Here is the code written to the page by the control. I'm sure you can
guess which values are written dynamically by the control. It has an
IntervalMinutes property and a MaxTimeoutMinutes property which
determine the interval and the point at which it stops polling...it is
running just fine:

<img id="ctl00_bodyContentPlaceHolder_ctl00" src="/POR/WebResource.axd?
d=mUKUxc3ixGueL4TfCzOuKwTPZUjDsmIEcLMyti5dxnFjvrwQs0o4cvQ9Al35fretAa5iw1Ft-
SE2_-4a0Kzg2YqvUc_vvae2auSusem_z0evNPrkju1Z608nqIGyWUi5_AIn3Fdkm_bKgOXHDhovmtHX_GXn04T48t1oqqqhd4s1&amp;t=633869732534470251"
style="border-width:0px;display:none;" />

<script type="text/javascript">
var SessionUpdaterExpiration = new Date('08/28/2009 02:26:24 PM');
var SessionUpdaterInterval = window.setInterval("UpdateSession
('ctl00_bodyContentPlaceHolder_ctl00')", 600000);

function UpdateSession(id)
{
if (new Date() >= SessionUpdaterExpiration)
window.clearInterval(SessionUpdaterInterval);
else
{
var img = document.getElementById(id);
if (img)
img.src = 'WebResource.axd?
d=mUKUxc3ixGueL4TfCzOuKwTPZUjDsmIEcLMyti5dxnFjvrwQs0o4cvQ9Al35fretAa5iw1Ft-
SE2_-4a0Kzg2YqvUc_vvae2auSusem_z0evNPrkju1Z608nqIGyWUi5_AIn3Fdkm_bKgOXHDhovmtHX_GXn04T48t1oqqqhd4s1&t=633869732534470251&guid='
+ Math.random();
}
}
</script>

Again, my problem is that the forms authentication ticket is still
expiring.
 
Ad

Advertisements

D

daokfella

I ran a little test, and it seems that AXD files are not protected by
forms authentication. Even though the site doesn't allow anonymous
users, I am able to navigate directly to any axd file and pull it up.
I guess I'll change my approach from an embedded image, to a page
handler. I was hoping to have a control that you could drag onto the
page without having to mess with the web.config. Oh well, registering
the handler is a small sacrifice to get this working. Any other ideas
are appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top