• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

Server.CreateObject vs. CreateObject

CreateObject instantiates on the client and Server.CreateObject on the server - am I right?
0
maritimegirl
Asked:
maritimegirl
  • 2
  • 2
1 Solution
 
AzraSoundCommented:
Server.CreateObject vs CreateObject

http://www.4guysfromrolla.com/webtech/043099-1.shtml
0
 
AzraSoundCommented:
another snippet i found on the web:

"Server.CreateObject vs. CreateObject

The ASP Developer should use the Server.CreateObject Object. If the ASP Developer uses MTS/COM+ library packages, use of Server.CreateObject would help to avoid blocking of threads. The reason being CreateObject equates to calling CoCreateInstance by the scripting engine. If the ASP Developer uses CreateObject, instead of Server.CreateObject, then the following can occur:

ASP is not aware of the object.
OnStartPage/OnEndPage page methods are not called.
ASP does not know the threading model of the object.
Server.CreateObject equates to GetObjectContext.CreateInstance. This means ASP is aware of the object and knows its threading model. In addition, by calling Server.CreateObject, the component will be in the same transaction as your ASP page if your ASP page is transactional."
0
 
maritimegirlAuthor Commented:
Adjusted points from 10 to 25
0
 
maritimegirlAuthor Commented:
Thanks - it is clearer now.  Hopefully it will solve a problem I have using createobject.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now