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 9030915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:36:25+00:00 2026-06-16T07:36:25+00:00

I have a dead-simple iOS app that simply displays a UIWebView displaying a certain

  • 0

I have a dead-simple iOS app that simply displays a UIWebView displaying a certain website that requires a login. If I run my app and try to login the site just redisplays the login page (with no error message). If I use Safari, I can login to that same site fine. What could I be doing wrong in my UIWebView? In case it matters, the site uses SSL / https.

  • 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-06-16T07:36:27+00:00Added an answer on June 16, 2026 at 7:36 am

    It turned out that the problem was this: Asp.Net Forms Authentication when using iPhone UIWebView

    (The UIWebView sends an odd User Agent header which ASP.NET doesn’t recognize so it thinks it can’t handle cookies. This has apparently been fixed in ASP.NET 4.5 and even in earlier versions you can fix it on the server if you have access to the ASP.NET site)

    and the answer was here: Change User Agent in UIWebView (iPhone SDK)

    which linked to: http://www.mphweb.com/en/blog/easily-set-user-agent-uiwebview

    with the critical part being to put this code in your app startup code:

    - (BOOL)application:(UIApplication *)application
            didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        NSDictionary *dictionary = [NSDictionary 
            dictionaryWithObjectsAndKeys:
            @"Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5", 
            @"UserAgent", nil];
        [[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
    }
    

    This changes the User Agent. There are a surprising amounts of other ways to do this, some immensely more complicated (one of which is called “swizzling”) and most of which don’t work.

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

Sidebar

Related Questions

My question is dead simple. I just casually discovered that once you have defined
I have an app in progress that requires communication between two already identified users
Perhaps it's a syntax error, but I never assume that. I have a -dead-
I have a dead simple progress bar using something like the following: import sys
I have a very simple query that only returns one record. When I try
I have a command line php app that I need to distribute to a
I have a dead simple Common Lisp question: what is the idiomatic way of
I have a dead-simple question. How to use any SQLite library with nodejs under
Here's a dead-simple webpage that leaks memory in IE8 using jQuery (I detect memory
I'm learning Rails, and got into a little problem. I'm writing dead simple app

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.