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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:22:31+00:00 2026-05-29T05:22:31+00:00

This is an odd one. I developed a simple iPhone application for management at

  • 0

This is an odd one. I developed a simple iPhone application for management at my company to check real time sales statistics. The first hurdle was figuring out how to get the app to communicate with our old MSSQL 2005 server. After some research it seemed like the fastest way to do it was to create a basic ASP page that would spit out query results with response.write() calls. This works pretty well actually- but the ASP page that returns the results is open to the entire world. The only ‘security’ mechanism I’ve got on it isn’t really one at all- changing the HTTP port on the server side.

So my question is- what are best practices for this? What would work between ASP and Objective-C? I’ve read up on some basic challenge-response, encryption, and the like, but it seems like overkill for a simple string of generally unintelligible sales numbers. As the app develops into something more complex however, I’d like this problem solved before the asp starts sending back more sensitive data.

Here is my connection to server code, if it helps. The constant is just there so I can append POST data to it to get to different stats based on what I want from the app. The logic for this is elsewhere and not really important.

NSString * const appDataUrl = @"http://{the url for the asp page}";

//Don't ask me how this works. Google FTW...
-(NSString *) pullData:(NSString *) url {
    NSError * error = nil;
    NSURLResponse * response = nil;
    NSData * downloadedData = 
        [NSURLConnection sendSynchronousRequest:
         [NSURLRequest requestWithURL:
          [NSURL URLWithString:url]] returningResponse:&response error:&error];
    NSString *strData = [[NSString alloc]initWithData:downloadedData encoding:NSUTF8StringEncoding];
    return strData;
}

Thanks guys.

  • 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-29T05:22:32+00:00Added an answer on May 29, 2026 at 5:22 am

    You can use HTTP Authentication (Digest for example) in which you would add a username and password to each request. I don’t know if Objective-C has the necessary library to generate the relevant digest token, but if it doesn’t you can use one of the HTTP libraries available which I’m sure can handle that.

    You can then add the authentication required inside IIS so that only people who know the username and password can access that URL.

    Another way of doing that would be to add a special header to the HTTP request in Objective-C, something like X-Auth with a special random value (it can be a predefined GUID).

    The request will be sent with that special header and you can check its existence and its value in ASP.

    I would also suggest adding SSL so you can access this request via HTTPS so that no one can sniff the data out.

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

Sidebar

Related Questions

Alright so this is an odd one... I have an application built in ColdFusion
This is a really odd one that has been annoying me for some time,
I guess this is an odd one, and the answer is most likely it
This is an odd thing I've just run into. I have a web application
This is an odd one, not one I've come across before. My project complies
This is an odd one, for whatever reason, getting the children of an element
Odd one this... The following command returns what I would expect when I run
Odd one this. I am using NHibernate with one website. I have configured log4net
We are new to iOS development and this is our first application for iPad
OK this is an odd one. I wanted to install ASP.NET MVC 2 Beta

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.