.Net 2.0 - WebBrowser control embedded in IE causes problems

L

L. Chernov

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:ModPkiNew.dll#Mod.Online.Client.ModPkiNew.SignForm"
name="ModPkiObj" VIEWASTEXT>
</OBJECT>

And I get the following error:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'WebBrowser'.
at System.Windows.Forms.WebBrowser.get_AxIWebBrowser2()
at System.Windows.Forms.WebBrowser.PerformNavigate2(Object& URL, Object&
flags, Object& targetFrameName, Object& postData, Object& headers)
at System.Windows.Forms.WebBrowser.PerformNavigateHelper(String
urlString, Boolean newWindow, String targetFrameName, Byte[] postData,
String headers)
at System.Windows.Forms.WebBrowser.Navigate(String urlString)
at Mod.Online.Client.ModPkiNew.SignForm.button1_Click(Object sender,
EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr 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
 
Joined
Aug 22, 2006
Messages
1
Reaction score
0
Did you ever find a fix?

I also have seen this problem and it does not appear to be because of the object instanciation. All other controls work but the WebBrowser seems to be disposed of while the control is being loaded in the browser. I need to get this working so if anyone has some ideas I would love to hear them - thanks!

Brad
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top