title: How to get favicon from url when website has no access to the internet
body: <p>How can I get the favicon from <strong>ANY</strong> webpage (webpage has for example no access to the internet) without using a 3th party application like Google S2 Converter or something else in c#/asp.net?</p>
  
  <p>I am a developer of an internal Web application; we generate in one of our page a table with dynamic links to other internal websites. We don’t want to download every possible icon from the internal websites and link them in the table. Is there a way to get the icon from a page dynamically?</p>
  
  <p><strong>example:</strong></p>
  
  <pre><code>&lt;table&gt;
  @foreach (var mylink in Model.links) 
  {
     var faviconOfPage = //Get Url of favicon &gt; example: favicon of subpage.mycompany.com
     &lt;tr&gt;
         &lt;td&gt;&lt;a href="@(mylink.url).ToString()"&gt;@mylink.name&lt;/a&gt;&lt;/td&gt;
         &lt;td&gt;&lt;img src="@faviconOfPage"&gt;&lt;/td&gt;
     &lt;/tr&gt;
  }
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>Note</strong>: The requested site is internal: no access from outside!</p>
  
  <p>Thank you for helping me!</p>