Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Server.CreateObject() vs new ActiveXObject()

Reply
Thread Tools

Server.CreateObject() vs new ActiveXObject()

 
 
Andrew Hilton
Guest
Posts: n/a
 
      02-23-2006
When you create an object in classic asp code, should you always use
Server.CreateObject("ProgID")? Are there implications with stability (ie
memory leaks) if you create COM objects in other ways in IIS?

We use Javascript for our ASP coding, using a mixture of
Server.CreateObject() and new ActiveXObject(). The web server hangs
occasionally (once every 2-3 months) and we were wondering if this might be
the culprit...

Thanks!
Andrew


 
Reply With Quote
 
 
 
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      02-23-2006

"Andrew Hilton" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> When you create an object in classic asp code, should you always use
> Server.CreateObject("ProgID")? Are there implications with stability (ie
> memory leaks) if you create COM objects in other ways in IIS?


Server.CreateObject is NT Option Pack 4 (NT4) legacy code and includes some
overhead.

> We use Javascript for our ASP coding, using a mixture of
> Server.CreateObject() and new ActiveXObject(). The web server hangs
> occasionally (once every 2-3 months) and we were wondering if this might
> be the culprit...


No definitely not. You could install debugdiag to know what was the real
cause.

http://www.microsoft.com/windowsserv...s/default.mspx

 
Reply With Quote
 
 
 
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      02-23-2006
"Andrew Hilton" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> When you create an object in classic asp code, should you always use
> Server.CreateObject("ProgID")? Are there implications with stability (ie
> memory leaks) if you create COM objects in other ways in IIS?
>
> We use Javascript for our ASP coding, using a mixture of
> Server.CreateObject() and new ActiveXObject(). The web server hangs
> occasionally (once every 2-3 months) and we were wondering if this might
> be the culprit...


http://www.aspfaq.com/show.asp?id=2336

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS


 
Reply With Quote
 
Andrew Hilton
Guest
Posts: n/a
 
      03-02-2006
Egbert,

"Egbert Nierop (MVP for IIS)" <(E-Mail Removed)> wrote in
message news:%(E-Mail Removed)...
>
> "Andrew Hilton" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> When you create an object in classic asp code, should you always use
>> Server.CreateObject("ProgID")? Are there implications with stability (ie
>> memory leaks) if you create COM objects in other ways in IIS?

>
> Server.CreateObject is NT Option Pack 4 (NT4) legacy code and includes
> some overhead.
>


Is it really legacy code? I can't find anything on MSDN to support that.
However I now know it's primarily used to launch COM+ objects, which makes
me wonder if the object is loaded into another process. In any case, it's
good enough argument to start using 'new ActiveXObject()'.

>> We use Javascript for our ASP coding, using a mixture of
>> Server.CreateObject() and new ActiveXObject(). The web server hangs
>> occasionally (once every 2-3 months) and we were wondering if this might
>> be the culprit...

>
> No definitely not. You could install debugdiag to know what was the real
> cause.
>
> http://www.microsoft.com/windowsserv...s/default.mspx

Thank you, I will give this a try.

Andrew


 
Reply With Quote
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      03-03-2006

"Andrew Hilton" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Egbert,
>
> "Egbert Nierop (MVP for IIS)" <(E-Mail Removed)> wrote in
> message news:%(E-Mail Removed)...
>>
>> "Andrew Hilton" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> When you create an object in classic asp code, should you always use
>>> Server.CreateObject("ProgID")? Are there implications with stability
>>> (ie memory leaks) if you create COM objects in other ways in IIS?

>>
>> Server.CreateObject is NT Option Pack 4 (NT4) legacy code and includes
>> some overhead.
>>

>
> Is it really legacy code? I can't find anything on MSDN to support that.
> However I now know it's primarily used to launch COM+ objects, which makes


Yes, it is really legacy code. I don't want to proof this point by digging
into old MSDNs, just try this on NT4 with the option pack.

> me wonder if the object is loaded into another process. In any case, it's
> good enough argument to start using 'new ActiveXObject()'.


sure it is good enough. for instance, ADODB does nothing, really nothing
with ASP while IIS tries to find some legacy method 'OnStartPage' through
late binding if you use Server.CreateObject and it also did some things with
transactions in the past I believe.

>>> We use Javascript for our ASP coding, using a mixture of
>>> Server.CreateObject() and new ActiveXObject(). The web server hangs
>>> occasionally (once every 2-3 months) and we were wondering if this might
>>> be the culprit...

>>
>> No definitely not. You could install debugdiag to know what was the real
>> cause.
>>
>> http://www.microsoft.com/windowsserv...s/default.mspx

> Thank you, I will give this a try.
>
> Andrew
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript new-new-new-new-newbee weblinkunlimited@gmail.com Javascript 2 03-11-2008 01:15 AM
New computer, New OS, New Wireless Problem :-\ =?Utf-8?B?RGFu?= Wireless Networking 3 07-31-2005 02:11 PM
[Firefox] Use New Tab instead of New Window? paul j Firefox 7 04-07-2005 09:40 PM
Why can not register a new .net passport or a new hotmail account Alick Lv MCSD 1 01-04-2004 06:12 PM



Advertisments