How to set current document.domain in WebBrowser Control to avoid "Access denied"?

How to set current document.domain in WebBrowser Control to avoid "Access Denied" in cross-domain calls (XMLHTTP requests or iframe / frame access)?

I tried

 CurrentDocument = WebBrowserControl.Document CurrentDocument.domain = "example.com" Console.writeline("xx" & CurrentDocument.domain) 

It doesn't work anyway it never reaches console.writeline

Am I doing something wrong? Or should I use WebBrowserControl.ActiveXInstance ?

+4
source share
1 answer

What language do you write it in? Do you access the .Domain property or the non-existent .domain property?

+1
source

All Articles