title: UnauthorizedAccessException when get Html code IFrame using WebBrowser
body: <p>Using Developer Tools in IE or Chrome, I get html code for a frame. No problem.</p>
  
  <p>Now, I want do it using C# application. I have System.Windows.Form.WebBrowser in VS2010. I try get Html code for a Frame.</p>
  
  <pre><code> public static HtmlElementCollection GetElementsByTagNameForFrame(this WebBrowser wb, 
                                               string tag, string idFrame)
   {
        return wb.Document.Window.Frames[idFrame].Document.GetElementsByTagName(tag);
   }
  </code></pre>
  
  <p>but I get error UnauthorizedAccessException.</p>
  
  <p>I try again like this <a href="https://stackoverflow.com/questions/4146184/read-html-code-from-iframe-using-webbrowser-c-sharp">Read HTML code from iframe using Webbrowser C#</a> but I get the same error.</p>
  
  <pre><code>string content = doc.Window.Frames["injected-iframe"].WindowFrameElement.InnerText; 
  </code></pre>
  
  <p>Any suggestions ?</p>