Question

Thanks to an awesome article by Scott Hanselman I managed to implement Microsoft.AspNet.FriendlyUrls in relatively quick time. One thing I'm struggling with is where I can customise what is classed as a mobile device. Has anyone had any success with this?

e.g. I want only iPhone to be classed as a mobile device and all others to be served the desktop version by default.

Dev Environment

  • Visual Studio 2010 + IIS Express
  • WebForms
  • .NET v4
  • Latest Microsoft.AspNet.FriendlyUrls from NuGet

Original article link http://www.hanselman.com/blog/CommentView.aspx?guid=724141DA-9E27-44AE-A370-9E311BAED472#2f194665-9564-4c69-8b52-015c798feaa9

Thanks!

Was it helpful?

Solution

Finally solved it. I subclassed WebFormsFriendlyUrlResolver and overrode the GetExtensions method - returning relevant extensions based on my own mobile detection logic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top