Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6917915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:47:32+00:00 2026-05-27T09:47:32+00:00

I have an Asp.Net MVC 3 mobile web app and get requests fail with

  • 0

I have an Asp.Net MVC 3 mobile web app and get requests fail with HTTP 302 response in Mobile Safari when app is launched using short cut on home screen.

I’ve nailed down root cause being in different user-agent strings sent to web server. For reference, below are three user-agent strings I use for testing:

Chrome:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1

Mobile Safari:
Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5

Mobile Safari when launched from shortcut:
Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8G4

There are two actions in web app: Login and Main. User is required to authenticate using Login (forms authentication is used), before accessing Main. After signing in user is automatically redirected to Main (redirect is done using js, authentication is done via XmlHttpRequest).

There are couple cases that help grasp what’s exactly going on:
1. Restart IIS Express
2. Open Fiddler
3. Login to web app using Chrome
4. In Fiddler drug & drop get request to Main to request builder
5. Change user agent string to Mobile Safari and execute
6. Verify Response 200
7. Change user agent string to Mobile Safari Shortcut and execute
8. Verify Response 200
9. Change user agent back to Chrome and execute
10.Verfiy Response 200

So far so good, but if we change the order of operations 5 and 7:
1. Restart IIS Express
2. Open Fiddler
3. Login to web app using Chrome
4. In Fiddler drug & drop get request to Main to request builder
5. Change user agent string to Mobile Safari Shortcut and execute
6. Verify Response 302
7. Change user agent string to Mobile Safari and execute
8. Verify Response 302
9. Change user agent back to Chrome and executre
10.Verfiy Response 200

So, it looks like when sending Mobile Safari Shortcut user-agent string first, all subsequent attempts to access Main from Mobile Safari will fail. I know described behavior may sound crazy, but I asked couple more people to look into this and confirmed that it indeed is.

Apparently it may have something to do with forms authentication. I tried setting non persistent cookie as someone suggested with no luck. Besides, as can be seen in test cases all requests used to reproduce a bug send authentication cookie acquired by Chrome and the only difference in all those requests was a user-agent string.

What other choices except from debugging an Asp.Net MVC framework code do I have?

Any help would be much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:47:32+00:00Added an answer on May 27, 2026 at 9:47 am

    OK, it’s finally resolved. It turned out to be a dupe of ASP.NET user-agent sniffing and IE10 (Internet Explorer 10). Apparently, iOS shortcut user-agent string is not recognized either. Hope, it helps someone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPad app that submits orders to an ASP.NET MVC web site
I have an asp.net mvc app running on a local iis website that is
I have a asp.net mvc 3 mobile application, and by default most of the
I have simple jQuery Mobile site created using asp.net mvc 2 and uses basic
Does Visual Web Developer 2010 Express edition have ASP.NET MVC 2 based web site
I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual
I have ASP.NET MVC Beta on our web server running a few apps. My
I have been reading this link from Steven Sanderson about mobile web development http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application
I have planned to create the mobile site using ASP.NET MVC. So, there is
I have ASP.NET MVC web application. I need to deploy it which consists of:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.