server.createobject vs createobject

Results 1 to 2 of 2

Thread: server.createobject vs createobject

  1. #1
    NAN Guest

    Default server.createobject vs createobject

    hi,<BR>i wanted to know the difference between server.createobject & createobject.<BR>& which one should be used & why???<BR>thanks,<BR>NAN.

  2. #2
    Join Date
    Dec 1969

    Default An essay Question?

    Seems like one...<BR><BR>Got it...READ THIS BEN<BR>Akhilesh - 2/16/2001 12:20:46 PM<BR><BR>--------------------------------------------------------------------------------<BR> from MSDN <BR><BR><BR>Server.CreateObject vs. CreateObject <BR>Recommendations <BR>Use Server.CreateObject. If you&#039;re using MTS/COM+ library packages, use Server.CreateObject to avoid blocking of threads. <BR><BR>Why <BR>CreateObject equates to calling CoCreateInstance by the scripting engine. If you use CreateObject instead of Server.CreateObject, the following things occur: <BR><BR>ASP is not aware of the object. <BR>OnStartPage/OnEndPage page methods are not called. <BR>ASP does not know the threading model of the object. <BR><BR>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, your component will be in the same transaction as your ASP page if your ASP page is transactional. (Just note that a transactional page may imply an avoidable coupling of business rules and the presentation layer.) <BR><BR>Common Traps <BR>When an object is behind a firewall, you may need to call CreateObject. See Q193230 PRB: Server.CreateObject Fails when Object is Behind Firewall for more information. <BR><BR>More Information <BR>While CreateObject is faster than Server.CreateObject under IIS 4.0, the performance is the same under IIS 5.0. Also, if you&#039;re using MTS/COM+ library packages/applications, Server.CreateObject prevents blocking of threads. <BR><BR>the firewall business <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts