Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What does AspCompat="true" mean and when should I use it?



What does AspCompat="true" mean and when should I use it?..

Answer / swapna

AspCompat is an aid in migrating ASP pages to ASPX pages.
It defaults to false but should be set to true in any ASPX
file that creates apartment-threaded COM objects--that is,
COM objects registered ThreadingModel=Apartment.

That includes all COM objects written with Visual Basic
6.0. AspCompat should also be set to true (regardless of
threading model) if the page creates COM objects that
access intrinsic ASP objects such as Request and Response.
The following directive sets AspCompat to true:


<%@ Page AspCompat="true" %>
Setting AspCompat to true does two things. First, it makes
intrinsic ASP objects available to the COM components
by placing unmanaged wrappers around the equivalent ASP.NET
objects.

Second, it improves the performance of calls that the page
places to apartment- threaded COM objects by ensuring that
the page (actually, the thread that processes the request
for the page) and the COM objects it creates share an
apartment.

AspCompat="true" forces ASP.NET request threads into single-
threaded apartments (STAs). If those threads create COM
objects marked ThreadingModel=Apartment, then the objects
are created in the same STAs as the threads that created
them. Without AspCompat="true," request threads run in a
multithreaded apartment (MTA) and each call to an STA-based
COM object incurs a performance hit when it's marshaled
across apartment boundaries.

Do not set AspCompat to true if your page uses no COM
objects or if it uses COM objects that don't access ASP
intrinsic objects and that are registered
ThreadingModel=Free or ThreadingModel=Both.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

ASP.NET uses event driven programming model.Justify.

2 Answers  


To call a Web service which transport protocol you can use?

3 Answers   Siebel,


What does this do? sn -t foo.dll

3 Answers  


What is owin authentication?

0 Answers  


What is a session in programming?

0 Answers  


What is the use of session state and application state and difference between them?

0 Answers  


what are the files used in asp .net

1 Answers  


What is custom tag in web.config ?

2 Answers   Accenture, BirlaSoft,


What type of code (server or client) is found in a Code- Behind class?

2 Answers  


1. What is Connection Pooling…? 2. Maintaining Sessions in ASP.NET 3. ASP.NET page lifecycle. 4. Can we store objects in sessions. 5. What is AJAX..? 6. Serialization/Deserialization. Why we use serialization and Deserialization…? 7. What are Arrays and Arraylist..? 8. Difference between Authentication and Authorization…? 9. Difference between abstract class and Interfaces 10. What is a view..? Does a view contain data..? 11. What are triggers..? 12. What are transactions..? 13. What is Metaview (oracle)..? 14. What is Inheritance..? How can we call a method from the base class..? 15. Can an abstract class have zero abstract methods..? 16. How to read from Message Queue..? 17. What is Metadata..? 18. You would prefer to have business logic in c# or DB Side..? Why…?

1 Answers   Franklin Templeton, Sky InfoTech,


what are httphandlers and httpmodules.and their differences.

1 Answers   Siemens,


Difference between ASP Session and ASP.NET Session?

2 Answers  


Categories