473,740 Members | 8,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.Net 2.0 - WebBrowser control embedded in IE causes problems

Hello,

I am trying to work with .Net 2005 WebBrowser object,
and put it on a "Windows control library" (embedded in a user control class)
and then I
am executing it from an ASP.Net webform(with IE6) with the following object
tag:
<OBJECT id="ModPkiObj" height="550" width="800"
classid="http:M odPkiNew.dll#Mo d.Online.Client .ModPkiNew.Sign Form"
name="ModPkiObj " VIEWASTEXT>
</OBJECT>

And I get the following error:

System.ObjectDi sposedException : Cannot access a disposed object.
Object name: 'WebBrowser'.
at System.Windows. Forms.WebBrowse r.get_AxIWebBro wser2()
at System.Windows. Forms.WebBrowse r.PerformNaviga te2(Object& URL, Object&
flags, Object& targetFrameName , Object& postData, Object& headers)
at System.Windows. Forms.WebBrowse r.PerformNaviga teHelper(String
urlString, Boolean newWindow, String targetFrameName , Byte[] postData,
String headers)
at System.Windows. Forms.WebBrowse r.Navigate(Stri ng urlString)
at Mod.Online.Clie nt.ModPkiNew.Si gnForm.button1_ Click(Object sender,
EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Remark: When using this control library class from a winform container I
dont get this bug.
Thank You
Jul 16 '06 #1
1 3301
hi, I notice that you have embedded the object in your html source versus
via script. Try the suggestions in the following post :
http://groups.google.com/group/micro...aa645f38887e76

Regards,
Alessandro Zifiglio
http://www.AsyncUI.net

"L. Chernov" <le***********@ mod.gov.ilha scritto nel messaggio
news:%2******** **********@TK2M SFTNGP04.phx.gb l...
Hello,

I am trying to work with .Net 2005 WebBrowser object,
and put it on a "Windows control library" (embedded in a user control
class)
and then I
am executing it from an ASP.Net webform(with IE6) with the following
object
tag:
<OBJECT id="ModPkiObj" height="550" width="800"
classid="http:M odPkiNew.dll#Mo d.Online.Client .ModPkiNew.Sign Form"
name="ModPkiObj " VIEWASTEXT>
</OBJECT>

And I get the following error:

System.ObjectDi sposedException : Cannot access a disposed object.
Object name: 'WebBrowser'.
at System.Windows. Forms.WebBrowse r.get_AxIWebBro wser2()
at System.Windows. Forms.WebBrowse r.PerformNaviga te2(Object& URL, Object&
flags, Object& targetFrameName , Object& postData, Object& headers)
at System.Windows. Forms.WebBrowse r.PerformNaviga teHelper(String
urlString, Boolean newWindow, String targetFrameName , Byte[] postData,
String headers)
at System.Windows. Forms.WebBrowse r.Navigate(Stri ng urlString)
at Mod.Online.Clie nt.ModPkiNew.Si gnForm.button1_ Click(Object sender,
EventArgs e)
at System.Windows. Forms.Control.O nClick(EventArg s e)
at System.Windows. Forms.Button.On Click(EventArgs e)
at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs mevent)
at System.Windows. Forms.Control.W mMouseUp(Messag e& m, MouseButtons
button, Int32 clicks)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)
at System.Windows. Forms.Button.Wn dProc(Message& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage&
m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
Remark: When using this control library class from a winform container I
dont get this bug.
Thank You


Jul 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7985
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script : VBScript and Javascript Client : 1. IE browser. 2. VBForm embedded with WebBrowser control (MS Internet
4
2887
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with an embedded IE webBrowser Control. Is there a possibility for my application to access the webBrowser control in the other application, too? Thanks in advance, Randy
0
3472
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a...
12
6376
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a WebBrowser control. I've looked into using some CSS
8
3419
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : *************************************************
2
7390
by: FishingScout | last post by:
I have a small html file that I have added to my project. When I added "sample.html", I set the build action to "embedded resource". In the application I would like to do something like this ( but this doesn't work ): WebBrowser.Navigate( "MyApplication.Sample.html" ) Does anyone know if
8
3769
by: Ludwig Wittgenstein | last post by:
Hi, all. How can i hook up an InternetExplorer object to a WebBrowser control that I have in my windows form. Basically what I want to do is automate the WebBrowser control via the InternetExplorer object (instead of loading iexplorer.exe externally...). Thanks,
0
1216
by: piercy | last post by:
Hi, i have webbrowser control which i use to design a IHTMLDocument2. This control basically acts like a word processor to the user but i need the output in html to send in an email (hence the reason for not using a rtb). Now, because my space is rather limited im giving the user the option to pop the control and toolbars associated with this in a new window to allow them to make it bigger smaller etc.etc. The pop up work fine however i cant...
4
4480
by: kimiraikkonen | last post by:
Hi, Just to test, i placed a simple webbrowser to login a site, this site has no problems and has same error with IE6 SP2 but it's suppressed as well and no problem with Firefox browser, but using webbrowser it shows scripting errors: There are a lot more sites that encounters scripting problems though they work just fine in Firefox, a sample: http://www.anaivanovic.com/forum/login.php
0
8794
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9484
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9272
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8218
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6756
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6056
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2195
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.