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

Server.CreateObject() vs new ActiveXObject()

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
Feb 23 '06 #1
4 10633

"Andrew Hilton" <hi*****@ocean.com.au.spamfree> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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

Feb 23 '06 #2
"Andrew Hilton" <hi*****@ocean.com.au.spamfree> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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
Feb 23 '06 #3
Egbert,

"Egbert Nierop (MVP for IIS)" <eg***********@nospam.invalid> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...

"Andrew Hilton" <hi*****@ocean.com.au.spamfree> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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
Mar 2 '06 #4

"Andrew Hilton" <hi*****@ocean.com.au.spamfree> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Egbert,

"Egbert Nierop (MVP for IIS)" <eg***********@nospam.invalid> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...

"Andrew Hilton" <hi*****@ocean.com.au.spamfree> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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


Mar 3 '06 #5

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

Similar topics

6
by: Andy Wawa | last post by:
Hi, on a simple HTML (not an ASP!)-Site I try to connect to a sql server (MS): <html> <title>Test</title> <head> <script language="javascript"> <!-- Function showForm(){
0
by: DanC | last post by:
How connecting a ActiveX-Object on server with authentication. Situation. ASP-aplication calling a JScript-script. It has to do with permissions because the script run correct on the server. So...
2
by: Marcin Zmyslowski | last post by:
Hello all! I have installed MSDE on my local computer - Windows 2000 Professional. I have created a function which runs me a link whose path is placed in the input field. This function looks...
9
by: Don | last post by:
I'm trying to run the following page on my desktop from my host server. It works just fine if I run it from my desktop, but not if I run it from the server. I get "Error: Permission denied" on...
2
by: sonu | last post by:
I am tring to create activexobject like var Fo =new ActiveXObject("Scripting.FileSystemObject"); but i am finding error that automation server cant create object any help
1
by: Mr. x | last post by:
.... The second time I am sending this email ... .... I want a good solution, please. .... Thanks :) What I need is moving xml data from client to server & vice versa, but not using xml file....
7
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function Body_Onload() ' create the object Set obj = Server.CreateObject("UploadImage.cTest") ' use method of the object...
10
by: rbenditt | last post by:
I've put together a simple script that uses the XMLHttpRequest() function. It works when I run it locally, but when I upload it to my web hosting account, I never get a response back. Here is what I...
3
by: Sagar | last post by:
I am working on a project where Server.CreateObject is replaced with CreateObject all over the project. Though I know that this will improve performance in terms of Memory overlhead because of how...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.