473,221 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

Strange behavior when using AspCompat=true

Hi all,

Got a question about the AspCompat=true page property. First a little
background. We have an ASP.NET app that uses two COM components. The first
is the Microsoft OWC 11 components and the second is a custom VB6 COM
component. So I was reading about AspCompat=true and it seemed like it would
be a good fit for our app. From what I can tell both of the COM components
that we are using are STA and we are creating the components in Page_load
event as is required so it seems like we are a good fit for using
AspCompat=true. So I added that to the pages in our app where we create the
COM objects. And did some testing and I've gotten some strange results. The
very first time I run my app, I get faster performance. I can tell this
because the both components are using in generating visual information and
when I run the app the first time, the display comes up faster than it did
without the AspCompat=true page property. But if close the app and then
launch another browser and start the app up again, my performance goes back
to the way it was before I added the AspCompat=true. Its very strange. I
have duplicated this test several times to confirm what I was seeing and I
get the same behavior every time. I have tried the same test on two
different machines and get consistent behavior. It seems the only time I get
improved performance is if I do an IISRESET to recycle IIS and then run the
app. That first session runs fast but then non after it do. Does anyone have
any clues as to what might be happening ? Do I need to add the
AspCompat=true page property to every page in my project or just the pages
that have the COM objects ?

Thanks in advance,

Nick
Jan 22 '07 #1
1 2956
Thats what I have done, and I do actually see a performance benefit, but I
only seem to get it the first time I run the app. Do I have to add the
ASPCOMPAT=true to every page in the project ?

Nick

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:DE**********************************@microsof t.com...
If your COM objects are not Freethreaded (especially, the VB one is
definitely not!) then you need ASPCOMPAT=true on any page that uses these.
These guys need to run on an STA thread and the standard ASP.NET page
arrangement is not STA.
There is a performance hit from doing this but that's life.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Nicholas Palmer" wrote:
>Hi all,

Got a question about the AspCompat=true page property. First a little
background. We have an ASP.NET app that uses two COM components. The
first
is the Microsoft OWC 11 components and the second is a custom VB6 COM
component. So I was reading about AspCompat=true and it seemed like it
would
be a good fit for our app. From what I can tell both of the COM
components
that we are using are STA and we are creating the components in Page_load
event as is required so it seems like we are a good fit for using
AspCompat=true. So I added that to the pages in our app where we create
the
COM objects. And did some testing and I've gotten some strange results.
The
very first time I run my app, I get faster performance. I can tell this
because the both components are using in generating visual information
and
when I run the app the first time, the display comes up faster than it
did
without the AspCompat=true page property. But if close the app and then
launch another browser and start the app up again, my performance goes
back
to the way it was before I added the AspCompat=true. Its very strange. I
have duplicated this test several times to confirm what I was seeing and
I
get the same behavior every time. I have tried the same test on two
different machines and get consistent behavior. It seems the only time I
get
improved performance is if I do an IISRESET to recycle IIS and then run
the
app. That first session runs fast but then non after it do. Does anyone
have
any clues as to what might be happening ? Do I need to add the
AspCompat=true page property to every page in my project or just the
pages
that have the COM objects ?

Thanks in advance,

Nick

Jan 23 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
1
by: Mehr H | last post by:
I have been working on this for several days and am still have had no success in achieving this. Pleae help. It seems that documentation for this is very limited. I have looked in several books and...
3
by: Ralf Müller | last post by:
In a WindowsForms application it works just fine. Why not in ASP.NET? The interop assembly used was in both cases auto-generated by Visual Studio ..NET from the same .dll The code is exactly...
0
by: Kit Truong | last post by:
The page directive: <% @Page aspcompat="true" %> is causing my web pages to hang. (Page takes a very long time to load, and finally loads with a blank page) Everything was working yesterday...
2
by: danil.shopyrin | last post by:
Hello! We have some code that is written in COM. It was used in a "ISAPI-extension server " and everithing was fine. And it is fine at the moment. But now this code is used from the ASP.NET...
1
by: vermin | last post by:
Good morning. I have received a dll with an encrypting function I have to use in a asp.net page. I can't import it correctly. In classic asp I use the method I want in this way: <% Set x...
9
by: antonyliu2002 | last post by:
I have a C# class GeneralUtilities.cs , which many of my aspx.cs files will refer to. So, I've put it under the App_Code folder and compiled it to library using csc /target: library from the DOS...
0
by: ChrisMiddle10 | last post by:
Hey All, I suppose the subject says it all. I'm new to the IHttpHandler interface. I'm just trying to figure out how long - by default - an instance of an HttpHandler is kept alive when the...
0
by: Michael Sparks | last post by:
Hi, Just thought some people may be interested to hear that I've recently been looking at adding true concurrency into Kamaelia, by using Paul Boddie's pprocess as the core mechanism to allow...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.