473,395 Members | 1,941 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,395 software developers and data experts.

Running a referance

Hi,
i have a DLL that i have made, I need the page to keep it running until
the sesssion has ended.
When the users logs in using webcontrol login, i create the object when
the user has loged in but for some reason the object closes and does
not keep running, i know it starts up but it stop's for some reason !!

Partial Class Login
Inherits System.Web.UI.Page
Dim Monitor As FileMonitor.Monitor
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
End Sub
End Class

thnak you

Aug 16 '06 #1
3 1033
Try storing it in Session State if it is user-specific, or Cache or
Application State if used for ever visitor.

Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
Session("monitor")=Monitor
to retrieve:

Dim Monitor as FileMonitor.Monitor = DirectCast(Session("monitor"),
FileMonitor.Monitor)
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Zulander" wrote:
Hi,
i have a DLL that i have made, I need the page to keep it running until
the sesssion has ended.
When the users logs in using webcontrol login, i create the object when
the user has loged in but for some reason the object closes and does
not keep running, i know it starts up but it stop's for some reason !!

Partial Class Login
Inherits System.Web.UI.Page
Dim Monitor As FileMonitor.Monitor
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
End Sub
End Class

thnak you

Aug 16 '06 #2
What do you mean by, the object does not keep running?

Remember, asp.net is a stateless technology, once a request is
completed, all the objects are gone. If you want to persist some data
then you need to use some state bags, like Session or Cache or
Application memories..
Zulander wrote:
Hi,
i have a DLL that i have made, I need the page to keep it running until
the sesssion has ended.
When the users logs in using webcontrol login, i create the object when
the user has loged in but for some reason the object closes and does
not keep running, i know it starts up but it stop's for some reason !!

Partial Class Login
Inherits System.Web.UI.Page
Dim Monitor As FileMonitor.Monitor
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
End Sub
End Class

thnak you
Aug 16 '06 #3
Peter,
When you say i need to save it in a session should i still up i in the
Protected Sub Login1_LoggedIn?
This is my actual code:
rotected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim Monitor As New FileMonitor.Monitor
dim Userdir as string

Monitor.Interval = 5000
Monitor.TimeOut = 1
Monitor.DefaultDir = "C:\Inetpub\wwwroot\test\Temp\"
Userdir = Monitor.GeneratedDir
Monitor.tEnabled = True
Session("monitor") = Monitor
end sub

i am still fairly new to asp.net, i know asp!
thank you
Peter wrote:
Try storing it in Session State if it is user-specific, or Cache or
Application State if used for ever visitor.

Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
Session("monitor")=Monitor
to retrieve:

Dim Monitor as FileMonitor.Monitor = DirectCast(Session("monitor"),
FileMonitor.Monitor)
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Zulander" wrote:
Hi,
i have a DLL that i have made, I need the page to keep it running until
the sesssion has ended.
When the users logs in using webcontrol login, i create the object when
the user has loged in but for some reason the object closes and does
not keep running, i know it starts up but it stop's for some reason !!

Partial Class Login
Inherits System.Web.UI.Page
Dim Monitor As FileMonitor.Monitor
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Login1.LoggedIn
Dim Monitor As New FileMonitor.Monitor
Monitor.tEnabled = True
End Sub
End Class

thnak you
Aug 16 '06 #4

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

Similar topics

1
by: Pums | last post by:
Hi All, I am trying to retrive an image from the database. when i click the button for the first time in which i have written the code of retrival it doesn't go into the code of filling the...
0
by: Joshua Russell | last post by:
Hi, Has anyone get some code that will enable to return a thread referance by searching for athread by name? Thanx Josh
0
by: Christopher | last post by:
I am looking for a referance of messages and what triggers thier getting sent to the winproc such as WM_ACTIVATE. I dug through msdn and the platform sdk and don't see a place where it lists them...
0
by: CES | last post by:
This is probably a stupid question but is their a way of adding a pointer to an assemblies within the code as apposed to adding an assemblie referance in the Machine.Config file? I'm on a...
2
by: I am Sam | last post by:
I keep getting the following exception error: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request....
4
by: Hakan ÖRNEK | last post by:
Hi, I have two dll's like First.dll and Second.dll compiled by vb.net, a object in first.dll and, b object in Second.dll. I need hold cross referances; a.breferance=b and b.areferance=a I...
3
by: vimalankvk80 | last post by:
what will happen, if we forget to return ostream referance ? class A { Private: int _a; int _b;
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
by: EggsNSpam | last post by:
I want to pass the referance to a variable around, how do I do that? (unit is a complex object I made, and wondering about more complex data types) dim unit1 as new unit dim unit2 as new unit...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.