[RESOLVED]Browser Info in MVC

Hi,

I need to capture the browsers info and count no. of requests coming from the browser.

and also i need to block the request , if the request comes from a specified browser say FireFox

Depending on these requests and their count, i need to generate a report or a chart in dashboard.

Thanks,

Vijay 

The browser info in in the agent string header. Here is site that keeps track of the current agent strings. New ones appear with every new phone.

http://www.useragentstring.com/pages/useragentstring.php

You get the agent string with Request.UserAgent.

For hit tracking you process your web logs, or use google analytics.

You can use a MVC filter or constraint to handle your scenario. Please check these links

Filter actions based on UserAgent

ASP.NET MVC: Custom Constraints – Matching the User Agent String

vijayd48

Depending on these requests and their count, i need to generate a report or a chart in dashboard

It would be better if you can use some analytic services such as google analytics for this.

Leave a Reply