Re: Setting up a Timer in an ActiveX DLL



Sounds like you need to think about logically separating the data processing
(i.e. the collation/extraction of data from logs) from the actual user
viewing of that data Seon. Unless I'm misunderstanding something, the data
processing has to occur just once each day, and before anyone looks at the
stats.

This cannot be done on a timer inside IIS because ASP executes in the
context of a user request, or more specifically an 'ASP Session'. It can't
just wake up outside of such a context and do something useful. Also, it's
bad practice to try and persist objects between HTTP requests, say in the
Session variables.

This leaves two choices: 1) a separate EXE that wakes up at the appropriate
time and does the data processing itself, or sends an HTTP request to your
IIS server to achieve it via your ASP code. Alternatively, 2) trigger the
data processing when the first user attempts to view the stats during the
day (i.e. no timer at all). You have to be a bit careful in this 2nd case as
there could be multiple users trying to view the stats at the same time, and
your DLL would be executing on multiple threads within IIS.

Tony Proctor

"Seon" <Seon@News> wrote in message
news:umxyUA0EGHA.3064@xxxxxxxxxxxxxxxxxxxxxxx
>
>
>
> Ok, let me start again, and explain what I am doing...
>
> I am writing a WebStats App... for my web server, and I will also be
> packaging it up and selling it.
>
> Right now, my DLL really does nothing at all that requires it to run
> under IIS... all it does right now is extract/collate data from the
> logs, and write specific thinmgs into an access database, via
> ADODB/ODBC...
>
> Eventually, it will also handle login/domain access via ASP, and I will
> also encapsulate a lot of the back end code for the Stats DHTML
> generation within it to prevent clients from playing with/breaking the
> package.
>
> basically, I just want my DLL triggered every morning to collate the
> previous dayus logs form all domains being tracked.
>
> It all works fine now, apart from the auto running of itself every
> morning.
>
> So... Can an EXE be used instead of the DLL? Can I still access my
> classes the same way (Via ASP), and if so, can the EXE have a timer on a
> form (that never gets seen) run this way under IIS?
>
> Though I am a very capable web developer, and have no dramas with
> VBScript/JavaScript/ASP, and have written COM DLL's for IIS before as
> basic wrappers for other DLLs, I have never written something like this
> that has to automate itself.
>
> I dont want it running under windows schedule as it is something that
> needs to be self sufficient, as it will be a product I will be selling,
> and I want the installation to be quick and simple, and the package to
> work in the simplest way possible.
>
> I hope this clarifies things a bit...
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages

  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... we will be introducing the ability to configure IIS to run under ... and under the 32bit command line no error is thrown. ... the problem must be to do with how the dll is registered. ... > You should be able to reproduce your situation outside of ASP by creating ...
    (microsoft.public.inetserver.iis)
  • RE: ActiveX Too Many Files error from IIS
    ... I have seen this before and the issue was that the program (DLL or ASP page) ... was opening files to read from (config files) and were not closing them when ... > restarting IIS, but this does not solve the problem. ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... and under the 32bit command line no error is thrown. ... The dll is not in the System32 diectory. ... > to do with IIS or COM registration weirdness involving WOW64. ... > your ASP page. ...
    (microsoft.public.inetserver.iis)
  • Re: Using CSocket calls in COM+ DLL blocking IIS 6.0
    ... Then IIS spawns a separate DllHost to host your app. ... Note you didn't solve anything here, only ensured that others' web apps running on the same server won't be affected. ... Since you have many DLLs with this problem, ... IIS creates a threadpool (in ASP or ASPX), and if you think you 'solve' a problem by putting delays at another thread, the aspx or asp might have executed and STILL needs to be blocked, because otherwise, you would have a orphan threading, still doing work, like waiting for data etc... ...
    (microsoft.public.vc.atl)
  • Re: Thin Client Application
    ... To send the request to the web page at the client end, ... Another alternative is to install the dll into dcom on the server. ... complex data processing and heavy validation checks, ...
    (microsoft.public.fox.programmer.exchange)

Loading