Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Hosting a WebBrowser control in a web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jmi0@att.net - 07 Jan 2006 02:41 GMT
I need to have my web application (html, jsp, etc.) to host a
WebBrowser control by using the object tag for an assembly which
contains my custom user control which contains the WebBrowser control.
The problem is that the WebBrowser control won't load. It's prematurely
disposed when the control object being accessed in my C# code
InitializeComponent().

The info I've gathered so far seems to attribute this behavior to
security concern. While I was informed this is not a designed feature
for web page hosting, I've been seeing examples (in VB script) for the
usage. I, however, couldn't get these examples work for me either.

If the .net framework runtime indeed blocks the control's deployment in
a web page due to security concern, is there a way to bypass it? By
signing it, granting permission or other machnisms?

btw, my web server is Tomcat, not IIS. I, however, don't think it's
relavant because any other non-WebBrowser controls displayed just fine.

Any one has any insight on this?

Thanks in advance,
Jason
Dmytro Lapshyn [MVP] - 10 Jan 2006 14:57 GMT
Hi,

Wouldn't a simple IFRAME tag be a decent workaround for hosting another
instance of Web browser within a Web page?

>I need to have my web application (html, jsp, etc.) to host a
> WebBrowser control by using the object tag for an assembly which
[quoted text clipped - 19 lines]
> Thanks in advance,
> Jason
Jason - 10 Jan 2006 18:50 GMT
Hi Dmytro,

I'm very interested in your suggestion about using the IFRAME for this.
Can you possiblly give me some simple illustration/sample of it? I
suppose that the IFRAME object can be used in javascript to get some
information about its contained browser and the pages being browsed such
as the number of frames in the page.

Appreciate your help,
Jason

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Alec Yu - 28 Jan 2006 08:35 GMT
I have a solution to run your control fully trusted.
See http://en.ezlag.com/site/335/lagloadernet.aspx

The main reason for WebBrowser control not working in IE,
is due to the fact that IE is itself an ActiveX document container,
WebBrowser control is implemented as an IE instance hosted in
a .NET Windows Forms control, and thus you are trying to put
a ActiveX/.NET Windows Forms control containing an ActiveX
document container in another ActiveX document container,
which violates an IE limitation documented in Microsoft support
knowledge base KB311765. See
http://support.microsoft.com/default.aspx?scid=kb;en-us;311765

DsoFramer introduced in that document is not a stable solution,
even though you may google out more about DsoFramer and its
enhancements.

I spent weeks overcome this container-in-a-control-in-another-container
issue, and extended it to work with .NET Windows Forms control
based smart clients, as to allow them running fully trusted and install
.NET framework automatically on machines never installed .NET
framework runtime.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.