This is because the browser will not allow you to access iframes from another domain, this also happens on https sites where the domain name is the same, fortunately there is a way around this.
IFrame JS .
URL- iframe:
webBrowser1.Navigate("https://www.example.com/pagecontaingiframe.html");
webBrowser1.DocumentCompleted += WebBrowserDocumentCompleted;
, URL- iframe, url, , , , eval javascript , iframe.
void WebBrowserDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
if (e.Url.AbsolutePath != new Uri("https://www.example.com/iframeyouneedurl.html").AbsolutePath)
return;
webBrowser1.DocumentCompleted -= WebBrowserDocumentCompleted;
string jCode = "var iframe = document.getElementsByName('iframe_element')[0]; var innerDoc = iframe.contentDocument || iframe.contentWindow.document; innerDoc.documentElement.innerHTML";
string html = webBrowser1.Document.InvokeScript("eval", new object[] { jCode });
}