Adi Drumea

Friday, November 11, 2005

[.NET] .NET components in IE, part 1

Same .NET app, trying to make it run as an ActiveX component. Throughout the app, I have made extensive use of the Forms Designer, because I like designing the interface in a visual way. I hate the programmatic ways. Anyway, this allowed me to attach images to my custom buttons (they should really put one generic image button control in the framework) while not being bothered with details about the bitmaps -- they just go into the resources and it knows to load them automagically. Nothing cooler, except that when you run the same component from IE, you hit into something named localization issues. For each ResourceManager instantiation, the framework looks for culture specific resource files in two dozen places (derived from the component's URI). This would not be an issue over the LAN, but over the Internet it is. Moreso, on my system, it sometimes just hangs while doing this. Debugging the app led me to a GetObject call from the ResourceManager. It just stops there. I didn't have the pacience to see if there was a timeout (and even if it is, who cares).

Googled the net for answers, and finally found one great article for MSDN Mag:
http://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClients/

The solution appears to be removing the use of resource managers by loading the image files manually from external sources. This would reduce the number of HTTP requests to just 2 per component (the component and the .config file). It may or may not be a bug in the framework, but it certainly sends part of easy interface design to hell.

0 Comments:

Post a Comment

<< Home