Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Newbie Embedded WUC DLL Question

Reply
Thread Tools

Newbie Embedded WUC DLL Question

 
 
mdemase@gmail.com
Guest
Posts: n/a
 
      06-11-2007
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.

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      06-11-2007
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)

http://www.velocityreviews.com/forums/(E-Mail Removed) 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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
something like PHP imports or ASP WUC Nick Ruby 3 09-25-2005 06:50 PM
How to determine if a DLL is a COM DLL or .NET DLL Anushi ASP .Net 5 10-28-2004 01:59 PM
textboxes in dynamically loaded WUC not repopulated during PostBack Craig Buchanan ASP .Net Building Controls 1 02-20-2004 04:19 PM
quite nested wuc... Jan Limpens ASP .Net Web Controls 0 11-13-2003 09:26 AM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments