473,320 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Application cache and component

I've created a sub that will logoff a current user if another login occures
with the same UserID. when a login occures the host name of the login is
saved in the application cache:
if "is a valid user" THEN
Application(Me.txtUserID.Text) = Request.UserHostName
FormsAuthentication.RedirectFromLoginPage(Me.txtUs erID.Text,
Me.chkRemember.Checked)
END
On selected pages a check is made for a key value ofthe user id. If it does
not match the user is logged out. (if cache expired just accept first come
first serve)
code:
If Application.Item(User.Identity.Name) Is Nothing Then
Application(User.Identity.Name) = Request.UserHostName
ElseIf Application.Item(User.Identity.Name) <> Request.UserHostName
Then
FormsAuthentication.SignOut()
Response.Redirect("SessionTerminated.htm")
End If

So far it works, but will need more testing. However, I'm trying to move
this into a component, but vs.net will not reconize "Application.",
"Request.", "Response", nor "User."
my function starts with:
Function fn_MultiLoginCheck(ByVal thsRedirectPage As String) As Boolean

......
......
.....
end

I've learned enough here to know that i'm missing something i've imported
system.web.security, but what else should i import? or have i found something
that really can't be done?
thanks
you al are always a great help!!!
(Well, dis ant no Cold Fusion app)
9+ years CFM Programmer
kes
Nov 19 '05 #1
0 809

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Tom Dacon | last post by:
I have a little desktop application (it happens to be a Windows Forms analog clock) that's written in VB.Net (2003). I placed a shortcut in my Startup program group to start it up when I log on. I...
4
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference...
2
by: WJ | last post by:
This post is a follow up from the original post dated Oct 16, 2004 "I have this problem, pls help!" created by Paul FI. These bugs are rather serious and we would like to know how to get around. ...
7
by: Greg Collins [MVP] | last post by:
Hi, I couldn't find what I was looking for by searching the newsgroup, but perhaps these have already been discussed somewhere. This is a bit long with a lot of interrelated questions. What I've...
1
by: Ian | last post by:
Experimenting with transactions, and trying to disable part of them by deleting the relevant refererence in Component Services, I have come to the conclusion that something in COM+, perhaps the...
0
by: Oli | last post by:
My company has developed 2 win apps and 1 web app. All 3 apps use a 'common' business logic component (vb.net dll) and data access component. We recently refactored the common components to use...
3
by: wardemon | last post by:
Hi All, I have a aspx page named: ImageProcess.aspx that creates a thumbnail version of an image by passing the ImagePath, width, and height. The ImagePath is taken from a table from a database,...
5
by: J055 | last post by:
Hi The following code works on my develeopment machine using the VS web server. When I run the application on 2 other Windows 2003/IIS 6 servers no caching seems to take place at all. Can...
0
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi, I want to cache some stable user information on client side for later use by VB clients, so I implement enterprise library cache application block in COM+ serviced component which is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.