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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:13:05+00:00 2026-05-24T02:13:05+00:00

I have user authentication in my iPhone application. User login works in a way

  • 0

I have user authentication in my iPhone application. User login works in a way that application send username/password to web service for user check. The problem I have now is I don’t know how to setup ‘timeout’ (30 seconds) and stop requesting data from web service?

NSString *soapMsg = 
    [NSString stringWithFormat:
     @"<?xml version=\"1.0\" encoding=\"utf-8\"?>...", username, password
     ];

    NSURL *url = [NSURL URLWithString: @"http://...Service.asmx"];      

    NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];    
    NSString *msgLength = [NSString stringWithFormat:@"%d", [soapMsg length]];

    [req addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];   
    [req addValue:@"http://.../LoginUser" forHTTPHeaderField:@"SOAPAction"];    
    [req addValue:msgLength forHTTPHeaderField:@"Content-Length"];   
    [req setHTTPMethod:@"POST"];
    [req setHTTPBody: [soapMsg dataUsingEncoding:NSUTF8StringEncoding]];

    conn = [[NSURLConnection alloc] initWithRequest:req delegate:self];

    if (conn) 
    {
        webData = [[NSMutableData data] retain];
    }    
  • 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-24T02:13:07+00:00Added an answer on May 24, 2026 at 2:13 am
    [req setTimeoutInterval:urInterval];
    
    setTimeoutInterval:
    

    Sets the receiver’s timeout interval, in seconds.

    - (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval

    Parameters

    timeoutInterval

    The timeout interval, in seconds. If during a connection attempt
    

    the request remains idle for longer than the timeout interval, the
    request is considered to have timed out. The default timeout interval
    is 60 seconds.

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

Sidebar

Related Questions

I have an application that is using Windows Authentication and a SqlRoleProvider for user
I have a Web Service written in .NET that provides data for an iPhone
I have a login page for my Nitrogen based web app. If user authentication
I have a user Sql Authentication account that has remote access to my database
I have created a user login page and am using Forms Authentication. Users are
I have a website that's using forms authentication and membership. A user must have
I have a login page where I authenticate the user. When the authentication pass,
I want to add user authentication to my restful api that I have created
I currently use Authlogic in a web-app to handle user authentication, but have now
I have a web application for iPhone, which will ultimately run within a PhoneGap

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.