Hi there,
I have a third party dll that I need to initialize and terminate once
and only once per application. By application I mean a physical exe and not
the HTTP application. This is fine when I am creating a windows application
as I can use the static void main function to do the initialization and
termination. But my question is where would I do this in an ASP.NET web app.
I tried the application_start and application_end events. The initialization
worked fine but the termination causes a memory access violation. If I
terminate the dll earlier on lets say page unload, everything works fine.
But this is not feasiable , since I need to keep using the dll till the
application is running.
The only workaround I see to this problem is the make a exe that consumes
this dll and then shell is from the web application.
Any other Ideas or suggestions???
Thanks 2 1185
if your using 2000 and not 2003 with app pools, there are several asp.net
applications hosted under the same exe (aspnet_wp.exe). if you access a dll
in more than 1 app domain, the dll will get loaded again.
the easiest approach is to write a com wrapper and host it in com+.
-- bruce (sqlwork.com)
"Hiren Patel" <ab*@abc.com> wrote in message
news:eX*************@tk2msftngp13.phx.gbl...
| Hi there,
|
| I have a third party dll that I need to initialize and terminate once
| and only once per application. By application I mean a physical exe and
not
| the HTTP application. This is fine when I am creating a windows
application
| as I can use the static void main function to do the initialization and
| termination. But my question is where would I do this in an ASP.NET web
app.
| I tried the application_start and application_end events. The
initialization
| worked fine but the termination causes a memory access violation. If I
| terminate the dll earlier on lets say page unload, everything works fine.
| But this is not feasiable , since I need to keep using the dll till the
| application is running.
|
| The only workaround I see to this problem is the make a exe that consumes
| this dll and then shell is from the web application.
|
| Any other Ideas or suggestions???
|
| Thanks
|
|
Thanks for the suggestion. Lets say if I am always going to be on Win2003,
what are the other options.
"bruce barker" <no***********@safeco.com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl... if your using 2000 and not 2003 with app pools, there are several asp.net applications hosted under the same exe (aspnet_wp.exe). if you access a dll in more than 1 app domain, the dll will get loaded again.
the easiest approach is to write a com wrapper and host it in com+.
-- bruce (sqlwork.com)
"Hiren Patel" <ab*@abc.com> wrote in message news:eX*************@tk2msftngp13.phx.gbl... | Hi there, | | I have a third party dll that I need to initialize and terminate once | and only once per application. By application I mean a physical exe and not | the HTTP application. This is fine when I am creating a windows application | as I can use the static void main function to do the initialization and | termination. But my question is where would I do this in an ASP.NET web app. | I tried the application_start and application_end events. The initialization | worked fine but the termination causes a memory access violation. If I | terminate the dll earlier on lets say page unload, everything works fine. | But this is not feasiable , since I need to keep using the dll till the | application is running. | | The only workaround I see to this problem is the make a exe that consumes | this dll and then shell is from the web application. | | Any other Ideas or suggestions??? | | Thanks | |
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan Perl |
last post by:
There is something with initializing mutable class attributes that I am
struggling with. I'll use an example to explain:
class Father:
attr1=None # this is OK
attr2= # this is wrong...
|
by: Avi Uziel |
last post by:
Hi All,
I'm writing a Windows DLL which contain some utility classes.
One of my classes is Singleton, therefore contain some static members.
I'm using VC6 and linking to the DLL statically.
...
|
by: Bart Goeman |
last post by:
Hi,
I have a question about how to put redundant information in data
structures, initialized at compile time. This is often necessary
for performance reasons and can't be done at run time (data...
|
by: rupesh_533 |
last post by:
I am assuming the following things.
1.Pointer to an integer means it points to an integer,On incrementing
the pointer,it points to the next integer in memory.
2.Pointer to an array of some size...
|
by: Xarky |
last post by:
Hi,
I am creating a windows form, and when a specified event occurs
(button click), I am hiding the windows form and opening a new windows
form. When opening the new windows form and closing...
|
by: SM |
last post by:
I've always wonder if there is diference when declaring and
initializing a varible inside/outside a loop.
What's a better practice?
Declaring and initializing variables inside a loop routine,...
|
by: junky_fellow |
last post by:
Guys,
I was just looking at some code where to initialize an integer
with all F's following statement is used;
unsigned int i = -1;
I want to know if this is the right way of doing the...
|
by: Jason Doucette |
last post by:
Situation:
I have a simple struct that, say, holds a color (R, G, and B). I
created my own constructors to ease its creation. As a result, I lose
the default constructor. I dislike this, but...
|
by: WaterWalk |
last post by:
Hello. When I consult the ISO C++ standard, I notice that in
paragraph 3.6.2.1, the standard states:
"Objects with static storage duration shall be zero-initialized before
any other...
|
by: Jai Prabhu |
last post by:
Hi All,
Consider the following piece of code:
void func (void)
{
static unsigned char arr = "\x00\xAA\xBB";
fprintf (stderr, "0x%x\n", arr);
fprintf (stderr, "0x%x\n", arr);
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |