By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

Strange behavior when using AspCompat=true

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.