• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Http compression and WinForm controls as legacy ActiveX

MSDN Blogs > Never doubt thy debugger > Http compression and WinForm controls as legacy ActiveX

Http compression and WinForm controls as legacy ActiveX

Carlo Cardella
8 Sep 2006 6:28 PM
  • Comments 4

The following is the summary of a couple of cases I worked on a while ago, there are some details which I'll need to investigate thoroughly... anyway those are the facts so far.

PROBLEM DESCRIPTION
===================
I have a rich WinForms UserControl which is embedded into a web page. Since installing .NET 2.0 on the clients, the control stopped loading completely.
- I disabled security completely using caspol -s off => no effect
- I enabled fusion logging => no single entry generated
- I enabled the IEHost log => nothing created
- Changed to another client machine => same issues, same results
- I started writing a new UserControl from scratch and deployed it to the same server. The control could also not be loaded.

I deployed the same test project to another 2003 server in the same domain, with equal patch levels (SP1 and latest patches installed) and it worked. Perhaps a naming issue?
- I tried to change the names => no result
- I compared the HTTP requests to the different server => nothing special

- The issues stated above are reproducible from any client, such it should be a server or framework issue.
- I even have a customer which experienced the same problems
- The problem exists for two completely different client applications

To again clarify my problem:
----------------------------
- I'm definitely sure that I'm using the 2.0 tools and not the 1.1 policy / binding / whatever tools.
- I'm sure it is not a security issue, at least not one of the caspol which I disabled completely using "caspol -s off"
- I'm sure the control gets downloaded by the browser into the temporary IE directories and I'm sure that the downloaded version matches the dll's I deployed onto the server
- Windows Firewall is completely disabled through Group Policy
- Virus Scanner has been temporarily turned off, on both client and server
- I'm sure that the problem is not dependant on the control code itself It just doesn't load into the IEHost which I could conclude from none of the logs, neither IEHost-log nor binding-log are being created at all.

My remaining and only problem is why does it not load from that specific server. It must be something within the communication and not the control itself. Last update: I currently did a network trace and found one significant difference between the two servers: one is doing chunked HTTP response encoding, the other one not. I disabled my browser doing HTTP 1.1 and the control loads (HTTP 1.0 does not allow chunked encoding!).

 

SUMMARY of TROUBLESHOOTING
==========================
This is a known problem with Windows Forms controls embedded in Internet Explorer, along with HTTP compression enabled on the web server, and has nothing to do with the installation of .NET Framework 2.0 (the same issues applies also for version 1.1).  The second test server, where the application worked fine, was not configured to use http compression.

Troubleshooting the problem I found that the dll is downloaded in IE temporary folder with the name specified in ClassID (SimpleControl.dll#SimpleControl.UserControl1), and it does not show up using “gacutil /ldl” if I disable http compression (I tired “Compress static files” with and without “Compress applications files” with no difference), SimpleControl.dll is downloaded in IE temporary folder it also shows up with gacutil.
A second workaround is to package your assembly into a CAB file (like we used to do with ActiveX controls before the .NET arrival): you can find further reference on how to create and deploy a CAB file at
Walkthrough: Creating a CAB file.

To check if you are using http compression in IIS 6.0, do the following (Enabling HTTP Compression):

  1. In IIS console double click the local computer, right click the Web Sites folder and the click Properties
  2. Click the Service tab, and in the HTTP Compression section select the Compress application files checkbox to enable compression for dynamic files
  3. Select the Compress static files checkbox to enable compression for static files

 

Cheers
Carlo

  • 4 Comments
ASP.NET, CLR
Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post
Comments
  • Sam
    16 Aug 2007 11:55 AM

    Hi Carlo,

    Thanks for writing this blog post!! We are running into the same issue.  You mentioned it was a known issue....does Microsoft have a KB regarding it on their support site?  If so, please forward the link (and any other links you might think would be helpful) to my email address: <cut to save spam>

    Thanks,

    Sam

  • Carlo Cardella
    16 Aug 2007 12:20 PM

    Sam, glad to be helpful :-)

    To be honest I don't think there is a KB article already available, but I'll write one to fill the gap

    Cheers

  • Maysam
    21 Aug 2007 4:10 PM

    Thanks carlo,

    We had the same problem and we thought that is a securty issue on the client machine since it there were using citrix.

    Your notes is perfectly well documented.

  • Marcelo
    3 Mar 2009 1:16 PM

    Set your application to scripts only

Page 1 of 1 (4 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223