locked
Retreiving IE settings for trusted sites list using C#. RRS feed

  • Question

  • Hi All,

    I am in need of Retreiving IE settings for trusted sites list using C#.

    Is there any way to do it?

    Any help/guidance would be appreciated. Thanks !!

    Regards,

    Manoj Rajput

    Friday, June 8, 2012 12:48 PM

Answers

  • Regards,

    Manoj Rajput

    I got an answer:

    Retrieve value from registry it contains the list of trusted site:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains]

    and

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]

    If the "EscDomains" key exist then you should retrieve the trusted sites list from it. Search the "Domains" key only if the "EscDomains" does not exist – I think this key only exist in Win2k3 and XP.

    Wednesday, June 13, 2012 9:35 AM

All replies

  • The headers of a webpage (the beginning of the HTML webpagge) and negotiate when a connection is made to the webpage between the client and header.  If yo uview the HTML file for any webpagge with a text editor you will see the headers.  if you make a WebRequest you can read the entire HTML stream which includes the headers.  Is this waht you are looking for?

    A header looks like below.  It says that it is in english 'en-US'.  it will speciffy if the page is text, html, or xml along with a lot of other information

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1">
     
        
            <link rel="shortcut icon" href="http://i1.social.s-msft.com/Forums/GlobalResources/images/Msdn/favicon.ico" type="image/x-icon" /> 
        <link href="http://i1.social.s-msft.com/Forums/RequestReduceContent/cd5f1753c2484104d0bc122b47b2e7a3-b4cad28018057531a55e732da39faf80-RequestReducedStyle.css" rel="Stylesheet" type="text/css" /><meta name="CommunityInfo" content=" B=Msdn;A=Forums;L=en-US;" />
        <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.min.js" type="text/javascript" language="javascript"></script>
        <script src="http://i1.social.s-msft.com/Forums/RequestReduceContent/198faff60a83dd768cacdf60118b0b19-6584225de39c1527dd5dd7bce11792ab-RequestReducedScript.js" type="text/javascript" ></script>    
        <title>
        Retreiving IE settings for trusted sites list using C#.
    </title>
    	
            <!--[if IE 6]>
        <link type="text/css" rel="Stylesheet" href="http://i2.social.s-msft.com/Forums/resources/styles/IE6Core.css?cver=3145.123%0d%0a" />
        <![endif]-->
            <script type="text/javascript">
        //<![CDATA[
            var fms_site_culture = 'en-US'; var fms_site_lcid = '1033';
        //]]>
         </script>
        
        
        <script src="http://i1.social.s-msft.com/Forums/RequestReduceContent/b0ac5dc3242e4c7cd9266a8969589afc-92e294c56916967bc5d4415e0d96fd02-RequestReducedScript.js" type="text/javascript" ></script>    
        
    <script type="text/javascript"> 
        $(document).ready(function () {
            prettyPrint();
        });
    </script>
        <link rel="alternate" type="application/rss+xml" title="Retreiving IE settings for trusted sites list using C#." href="http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/5c2fda2a-6a5c-4dbf-97c2-c3233ee575b1?outputAs=rss" />
     
        <meta name="Search.MSForums.Iroot" content="netframework" />
        <meta name="Search.MSForums.CategoryID" content="5985ea91-73a5-490a-a1da-43adb138fe68" />
        <meta name="Search.MSForums.CategoryName" content="netdevelopment" />
        
        
     
    <!--
    Third party scripts and code linked to or referenced from this website are licensed to you by the parties that own such code, not by Microsoft.  See ASP.NET Ajax CDN Terms of Use – http://www.asp.net/ajaxlibrary/CDN.ashx.
    -->
    </head>


    jdweng

    Friday, June 8, 2012 4:16 PM
  • hi Jdweng,

    Thanks for the reply but I am afraid to say that your reply doesnt solve my purpose.

    Actaully I am looking way to retrieve Internet Explorer trusted site list using C# code.

    do you have any idea?

    -Manoj

    Saturday, June 9, 2012 9:08 AM
  • Do a search of the registry to see if you can find what key the setting are strored..  It would be something like the key below.  I would search for one of the sites in the registry for one of the sites the IE explorer is using. 

    HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates\trust


    jdweng

    • Proposed as answer by Mike Feng Tuesday, June 12, 2012 9:59 AM
    Saturday, June 9, 2012 10:25 AM
  • Yea that is related to what Microsoft does with IE and if you know that how to do that in C#.

    I see not anything which matches the purpose of this forum. The System Base class and that what is close related to it.

    Try the technet forums where those who know the answer on your technical question live. With that you can ask it in the C# forum is you don't know how to solve it with C# yourself.

    http://technet.microsoft.com/forums


    Success
    Cor

    • Proposed as answer by Mike Feng Tuesday, June 12, 2012 9:59 AM
    Monday, June 11, 2012 5:58 AM
  • Regards,

    Manoj Rajput

    I got an answer:

    Retrieve value from registry it contains the list of trusted site:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains]

    and

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]

    If the "EscDomains" key exist then you should retrieve the trusted sites list from it. Search the "Domains" key only if the "EscDomains" does not exist – I think this key only exist in Win2k3 and XP.

    Wednesday, June 13, 2012 9:35 AM