Newbie Embedded WUC DLL Question

Discussion in 'ASP .Net' started by mdemase@gmail.com, Jun 11, 2007.

  1. Guest

    Hello -

    I've been racking my brains trying to figure out what's going on with
    my embedded .NET 2.0 windows user control.

    I've developed a Windows Forms application using Visual C# 2005
    Express. I'm interested in migrating it to the web as an embedded
    windows user control.

    As a proof of concept, I've been playing around embedding some very
    basic Windows user controls into both HTML and ASP pages using Visual
    Web Developer 2005 Express. (My web development is very limited).
    I've done some searching and found examples of how to embed a user
    control as an object by inserting something like the following
    (<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
    height=480 width=480></OBJECT>) into HTML code and copying the DLL
    file in the 'root' (not /bin) directory of the page.

    Now here's where the fun comes in...

    I'm testing some very basic embedded controls using Microsoft's
    ASP.NET Development server and I'm getting some very odd and
    unexplained behavior.

    1) When I create a new website project and insert the control, most of
    the time (but not always) my sample control will display in the
    internal browser inside the Visual Web Developer IDE and it will
    display in IE (as launched from the Visual Web Developer IDE in debug
    mode)

    2) If I change the embedded user control code (inside Visual C#
    Express) and recompile and re-copy the DLL file into the web project
    directory, I very rarely see the updates reflected in the user
    control. It seems to be using a cached version of the DLL??

    3) Eventually, I will reach a state where the user control no longer
    even appears in the web browser window when trying to run the site
    (using the Development Server). It only shows up as an object icon
    place holder.

    I've tried all sorts of things like:
    1) Stopping the development server before copying the new DLL file
    into the web project
    2) Restarting Visual Web Developer Express
    3) Deleting all the temporary IE files
    4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
    \v2.0.50727\Temporary ASP.NET Files\

    None of those attempts seems to change what I'm observing - why only
    sometimes the embedded control displays and why none of the re-
    compiles/re-copying of the DLL files seem to 'take effect'. Also,
    once the control stops displaying, I essentially have to create an
    entirely new web project to see the control again.

    Any thoughts/links to examples or suggestions would be greatly
    appreciated.

    Thanks,
    Mike D.
     
    , Jun 11, 2007
    #1
    1. Advertising

  2. bruce barker Guest

    the control is cached in two places

    1) ie caches the dll in its temp area (use delete temp files in ie).
    2) the gac caches the jit'd code. use gacutil /cdl

    note: this is probably a dead-end approach. you should look at
    Silverlight as a more long term solution.

    -- bruce (sqlwork.com)

    wrote:
    > Hello -
    >
    > I've been racking my brains trying to figure out what's going on with
    > my embedded .NET 2.0 windows user control.
    >
    > I've developed a Windows Forms application using Visual C# 2005
    > Express. I'm interested in migrating it to the web as an embedded
    > windows user control.
    >
    > As a proof of concept, I've been playing around embedding some very
    > basic Windows user controls into both HTML and ASP pages using Visual
    > Web Developer 2005 Express. (My web development is very limited).
    > I've done some searching and found examples of how to embed a user
    > control as an object by inserting something like the following
    > (<OBJECT id="myObject" classid="myDll.dll#myNamespace.myControl"
    > height=480 width=480></OBJECT>) into HTML code and copying the DLL
    > file in the 'root' (not /bin) directory of the page.
    >
    > Now here's where the fun comes in...
    >
    > I'm testing some very basic embedded controls using Microsoft's
    > ASP.NET Development server and I'm getting some very odd and
    > unexplained behavior.
    >
    > 1) When I create a new website project and insert the control, most of
    > the time (but not always) my sample control will display in the
    > internal browser inside the Visual Web Developer IDE and it will
    > display in IE (as launched from the Visual Web Developer IDE in debug
    > mode)
    >
    > 2) If I change the embedded user control code (inside Visual C#
    > Express) and recompile and re-copy the DLL file into the web project
    > directory, I very rarely see the updates reflected in the user
    > control. It seems to be using a cached version of the DLL??
    >
    > 3) Eventually, I will reach a state where the user control no longer
    > even appears in the web browser window when trying to run the site
    > (using the Development Server). It only shows up as an object icon
    > place holder.
    >
    > I've tried all sorts of things like:
    > 1) Stopping the development server before copying the new DLL file
    > into the web project
    > 2) Restarting Visual Web Developer Express
    > 3) Deleting all the temporary IE files
    > 4) Deleting all the files from C:\WINDOWS\Microsoft.NET\Framework
    > \v2.0.50727\Temporary ASP.NET Files\
    >
    > None of those attempts seems to change what I'm observing - why only
    > sometimes the embedded control displays and why none of the re-
    > compiles/re-copying of the DLL files seem to 'take effect'. Also,
    > once the control stops displaying, I essentially have to create an
    > entirely new web project to see the control again.
    >
    > Any thoughts/links to examples or suggestions would be greatly
    > appreciated.
    >
    > Thanks,
    > Mike D.
    >
     
    bruce barker, Jun 11, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,778
  2. Craig Buchanan

    textboxes in dynamically loaded WUC not repopulated during PostBack

    Craig Buchanan, Feb 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    146
    Craig Buchanan
    Feb 20, 2004
  3. Jan Limpens

    quite nested wuc...

    Jan Limpens, Nov 13, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    109
    Jan Limpens
    Nov 13, 2003
  4. H. Simpson
    Replies:
    4
    Views:
    284
    H. Simpson
    Aug 3, 2004
  5. Nick
    Replies:
    3
    Views:
    118
    Devin Mullins
    Sep 25, 2005
Loading...

Share This Page