Interview
    C#
    VB.Net
    VC++
    ASP.Net
    ADO.Net
    .Net Framework
    Silverlight
    WPF(Windows Presentation Foundation)/XAML
    WCF(Windows Communication Foundation)
    Java
    PHP
    AJAX
    Assembly
    XML
    Wireless/Mobile Development
    Cold Fusion
    MSSQL Server 2000/2005/2008/2012
    MYSQL
    DB2
    MS Access
    Java Script
    VB Script
    JQuery
    Testing
    BlackBox Testing
    WhiteBox Testing
    OOPS
    SharePoint
    ASP.NET MVC
    HTML5
    CSS/CSS3
    IIS 7
    Windows 8
    Google API
    Facebook API
    Twitter API
    Android Programming
    iPhone/iPad Programming
    Windows Phone Programming
    Json
    Sencha-Touch
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit Question | Search 
Report Abuse Form
Reason:    
 
Interview
Home >> VB.Net >> What does the line <%@ page aspcompat=true %> actually do?

What does the line <%@ page aspcompat=true %> actually do?

Posted By Amit Singh on 12/11/2010
Views: 624
Major Category: .Net
Sub Category: VB.Net
Total Answer 1
User Information Answer
• Amit Singh
Posted Date 12/11/2010
ASP used an STA based thread-pool optimized for apartment-threaded components. This thread-pool was managed by MTS -- which is how/why ObjectContext could be flowed to components on a page.

ASP.NET by default uses an MTA based thread-pool (enables us to do async io completions, etc). For performance reasons, we don't by default attempt to surface the old ASP COM classic intrinsics via ObjectContext. Instead, components can directly get access to the intrinsics using the HttpContext.Current static property.

 For example:
Dim Request as HttpRequest
Dim Response as HttpResponse

Request = HttpContext.Current.Request
Response = HttpContext.Current.Response

Enabling the <%@ page aspcompat=true %> switch at the top of the page does two things:

1) Causes that page to be executed on an STA thread-pool instead of the new MTA one. This optimizes performance for VB6 created apartment threaded components.

2) Causes us to surface the old ASP COM Intrinsics via ObjectContext. This will enable existing COM components built against the old ASP typelibraries to continue to work (note that if you want to get access to the new ASP.NET intrinsics -- you need to write code like the ones above).


Report Abuse

Report Abuse Form
Reason:    
 
Total Online Users: 2790
Advertisement
dudelabs
Advertise with Us
  
Copyright © 2013MindStick. All Rights Reserved.