Smart clients and IE hosting

As part of my investigation of smart clients and security, I got a little side-tracked, not much really, into wondering about hosting winform usercontrols in IE.

The first thing that I learned was that this only works with IE.  I don't know if this is a big deal or not - depends on the application I suppose.  For my learning experiments and how I am applying this stuff to my work applications it doesn't matter.

A friend asked my about embedding .net into web applications similar to the way active-x is done.  I thought that it was possible - I had read that it was, but as usual until I try something it is really a black hole - doable, sure, but ...

I had a Chart recorder winform that I downloaded from somewhere.  I kinda wish the person that wrote it had put their name in the code - I would like to attirbute code that I've stolen. 

I converted the winform to a UserControl - stripping out some extra ui stuff to just get the chart recorder.  For testing I embedded it in a winform and all worked fine.

Then I created an html page and embedded it.  I created a vdir for this project and ran the user control with IE and my html page as the debugger.  Didn't run!  There is a timer that is normally started that runs the chart paper. What is going on?  My first thought was some kind of permissions thing.  I soon sent off an email to my favorite mail list "wintech off topic" and was asked about which timer I was using to cause the chart recorder to move.  I was using System.Timers.Timer.  I switched to System.Winforms.Forms.Timer and it still didn't work - except when IE is hidden under another window.  Interesting. 

Debugging using IE is interesting.  I received a link to this http://urbanasylum.dynu.com/JustTheFacts/archives/000092.html which has helped.

I uploaded my project to my web hosting site (brinkster) and tried it.  Nothing works even hiding ie. 

Anyway, that's where I am today.  This is fun.

Published Monday, April 14, 2003 7:25 AM by cloudycity

Comments

# re: Smart clients and IE hosting

did you ever get this figured out? I'm having the same problem right now...

Tuesday, January 20, 2004 2:40 AM by Javier

# re: Smart clients and IE hosting

Got it working... it looks like System.Timers.Timer works but Windows.Forms.Timer does not. If it doesn't work with System.Timers.Timer it is likely a permissions issue.

Tuesday, January 20, 2004 10:27 PM by javier

# re: Smart clients and IE hosting

Hi i am doing something similar .... just that i am trying to use HttpChannels for remoting in my user controls.. IE refuses to load the control with the HttpChannel.. is my problem also got to do with the permission issue? If so, is there any solution to it? thankz !

Friday, February 06, 2004 10:41 PM by Weeli

Leave a Comment

(required) 
(required) 
(optional)
(required)