Exception in axwebbrowser C#



Hi, I need some help with this control.

There's a windows form with a axwebbrowser control inside, so users can
navigate to a page and it's necessary to keep the session, because,
users will access many times to this site and don't want to log in each
time. The process is the following: the form is shown and user
navigate through the webbrowser control, the form can be closed and
opened many times but the session of the page referenced needs being
mantained.

That is why the form is static, the problem becomes whit the Navigate
method. The first time it works well and gets the site referenced, but
if this method is invoked again then an exception is thrown: "The
resource is in use".

If I detect that Navigate method was invoked (viewing the value
retrieved by the LocationURL property of the axwebbrowser control), I
can put a condition and then not to call this method, but then nothing
is shown in the browser.



the code is like this:

oURL="http://localhost/Default.aspx";; /* any valid URL */
object oEmpty = System.Reflection.Missing.Value;


if (this.axWebBrowser1.LocationURL.Equals(String.Empty))
{
axWebBrowser1.CtlRefresh();
//axWebBrowser1.Refresh();

}
else
{
this.axWebBrowser1.Navigate(oURL,ref oEmpty,ref oEmpty,ref
oEmpty,ref oEmpty);
} }


I've tried with axWebBrowser1.CtlRefresh() and axWebBrowser1.Refresh()
methods but nothing is viewed in the control.
The form is shown by a ShowDialog() or by a Show(), in the second case
it's necesary to Hide the form before.

any help will be appreciate.

Thanks in advance.

.



Relevant Pages

  • AxWebbrowser Exception: "The requested resource is in use"
    ... There's a windows form with a axwebbrowser control inside, ... navigate to a page and it's necessary to keep the session, because, ... opened many times but the session of the page referenced needs being ... object oEmpty = System.Reflection.Missing.Value; ...
    (microsoft.public.dotnet.languages.csharp)
  • How to cancel user-clicks in AxWebBrowser
    ... I am trying to present HTML in the AxWebBrowser control, ... cancel the even of user-clicks, since I don't want to user to navigate any ...
    (microsoft.public.dotnet.general)
  • AxWebBrowser Web Browser Control
    ... I host an AxWebBrowser control in my program. ... navigate to a new web page. ... Pengyu. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Theoretical question - question for Igor
    ... Broadvision makes a web development system where session information is ... Such a site would be a pain to record and replay. ... navigate to another page. ... capture onclick events on and tags, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Theoretical question - question for Igor
    ... Haven't thought of Broadvision-style URL munging. ... Broadvision makes a web development system where session information is ... Such a site would be a pain to record and replay. ... navigate to another page. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)