Microsoft Knowledge Base Email Alertz

(243826) - When you call Microsoft Foundation Classes components from Active Server Pages (ASP) pages, you may encounter performance and concurrency problems under load. This article describes factors that you can consider to avoid such problems.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 243826 - Last Review: November 17, 2003 - Revision: 3.2

INFO: Limitations of MFC COM Components Under ASP

This article was previously published under Q243826

SUMMARY

When you call Microsoft Foundation Classes components from Active Server Pages (ASP) pages, you may encounter performance and concurrency problems under load. This article describes factors that you can consider to avoid such problems.

MORE INFORMATION

When you are deciding between MFC and Active Template Library (ATL) to build COM objects that will run under ASP, you must consider the following factors:
  • MFC is heavy code for the server, whereas ATL produces small, fast, strong components.
  • MFC can only produce single-threaded apartment (STA) components. While STA components can perform well under ASP at page-scope, they should not be stored in session or application scope. ATL supports all COM threading models and can create components marked Both and aggregate the free-threaded marshaler.
  • Internally, MFC uses thread local storage (TLS) data to synchronize access to MFC global data and resources. Under high-load, this can be a performance issue.
  • CString, CList, CArray and other MFC classes can add significant overhead to time-critical code. This is documented in MSDN under "Tips for Improving Time Critical Code."

REFERENCES

Developing Active Server Components with ATL (http://msdn.microsoft.com/en-us/library/ms972340.aspx)

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
231592  (http://kbalertz.com/Feedback.aspx?kbNumber=231592/EN-US/ ) BUG: ATL ClassWizard Uses AfxGetStaticModuleState() in MFC EXE

APPLIES TO
  • Microsoft Internet Information Server 3.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Active Server Pages 4.0
Keywords: 
kbinfo kbthread KB243826
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate