DarthVader
DarthVader

Reputation: 55062

Allow HTTP request from mobile browsers exclusively

Is it possible to allow a user to access a page that creates random numbers only for mobile browsers?

Is there an easy way to do this?

Should I check the browser and agent against the mobile ones?

Essentially, I don't want users to hit a URL with a web browser from their PCs.

Upvotes: 0

Views: 731

Answers (1)

HatSoft
HatSoft

Reputation: 11201

Yes you can by detecting either by checking the value returned from servevaraible HTTP_USER_AGENT or HttpContext.Request.Browser.IsMobileDevice and allow httprequest on your mobile page

Example on http://www.codeproject.com/Articles/34422/Detecting-a-mobile-browser-in-ASP-NET

Upvotes: 1

Related Questions