title: How to Identify the client browser from .Net
body: <p>Can any one tell me what browser is the client using from the user agent below? If you can, than can you tell me how did you figure it out? I am trying to identify the client browser from .Net and it seems there is no bulletproof way of doing it. I thought the code below should be good enough to get the client browser name but an answer from .Net team states the method is not guarantied.</p>
  <p><strong>User Agent:</strong>     Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240</p>
  <p>C#</p>
  <pre><code>var req = HttpContext.Current.Request;
  var browserName = req.Browser.Browser;
  </code></pre>
  <p>.Net Team answer</p>
  <blockquote>
  <p>Thanks for your feedback. BrowserCap is a legacy feature and we don't
  keep updating it anymore, unless we find that asp.net feature is
  broken caused by this. If you really want your app to recognize Edge
  as Edge(not chrome), then you can add your own browser file to match
  the UA string of Edge under app_browsers folder.
  <a href="https://connect.microsoft.com/VisualStudio/feedback/details/2028404/ms-edge-is-reported-as-chrome" rel="nofollow noreferrer">Feedback</a></p>
  </blockquote>
  <p><em><em>Update</em>:</em>*
  Here are UA strings from three browsers that might suggest that the last piece of information might be the indicator but not for Chrome. As you can see chrome shows Safari/537.36 at the end of the UA so this can't be the indicator. Moreover, there is no safari installed on the system, so why google and Microsoft try to fool us? And I would like to ask them this question; what is the purpose of the User Agent if the information is there to fool us. Lets take it out of the header completely (less bytes to transfer through the internet). If this is the <a href="https://www.rfc-editor.org/rfc/rfc7231#section-5.5.3" rel="nofollow noreferrer">standards</a> than respect them or get rid of them completely. Please correct me if I am making wrong assumptions due to the lack of information.</p>
  <p><strong>Edge:</strong>
  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240</p>
  <p><strong>Firefox:</strong>
  Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0</p>
  <p><strong>Chrome:</strong>
  Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36</p>