How to block website access on mobile devices?

Nilkanth Nikam 1 Reputation point
2022-01-24T13:34:19.41+00:00

Hi,
Is it possible to block website access/browsing on all mobile phones?

I have already tried HttpContext.Request to check IsMobileDevice and User Agent to cross check browser type.

It does not work when I select chrome option "Request Desktop Site". When I click on "Request Desktop Site" option in mobile chrome then it opens my website.

Is there any way to block access of website on all mobile phones?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,330 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 58,441 Reputation points
    2022-01-24T15:38:50.477+00:00

    The chrome feature changes the agent string. There is no real way to detect faked agent strings.

    0 comments No comments