How to get the domain name from a WinForm UserControl hosted in Internet Explorer

  • Thread starter Thread starter kellygreer1
  • Start date Start date
K

kellygreer1

I have developed a User Control (in .NET 2.0) that runs hosted inside
Internet Explorer.
like in these articles
http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/
http://support.microsoft.com/?kbid=892466

Is there an easy way to reference the HTML Document "parent" of this
control and ask it for the domain? I could not find any way to
reference the document that worked (ex Parent or Container property)

Is there a way to ask the IEHost.dll that is hosting this control in
IE?

Is there a way through the security model to ask the Assembly if it has
been loaded with restricted permissions and if so why? and somehow get
to the domain it was pulled down from....

Any ideas?

Thanks in advance,
Kelly Greer
(e-mail address removed)
change nospam to yahoo
 
You can reference the document object using the code below:

HtmlDocument document =
(HtmlDocument)this.Site.GetService(typeof(HtmlDocument));

You will need unmanaged code permission to be able to run this code.

Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
 
Back
Top