Webservice Authentication From An IPhone App?

Aug 5, 2010

I have my iPhone app that calls an ASP.NET Webservice to download "data". Most of this needs to be protected, but currently the webservice that's deployed can be called by anyone who can figure out its URL, thus resulting in a complete loss of security.

The simplest form that I can think of would be for the phone to make a call over HTTPS including the username, password that the user logs in with, with every web service all. And each method will check to see if these credentials are correct before sending data to the user.

But this will result in an additional database call for every request to check if the user is authenticated, which is not very efficient.

View 2 Replies


Similar Messages:

Iphone - How To Create JSON Webservice In C# With Database Connectivity

Jan 3, 2011

How to create a JSON webservice in ASP.NET that connect to MS SQL Database and update/delete values from the database?

This webservice will eventually be used to communicate with iPhone SDK.

View 3 Replies

JavaScript - How To Pass Forms-based Authentication Form Iphone App To Website

Sep 22, 2010

I am working on creating an iphone application which logins to we website and retrieves a table, and displays the content within the app. To view the table a Login is required. It seems the site is using Form-Baseds Authentication. WebSite's Login Screen So How do I pass the login ID and pass from xcode to the to the site and retain the information so the user only needs to login once.

View 1 Replies

Enable Authentication In Webservice?

Jul 13, 2010

How do I configure .NET webservice to require all consumers to supply credentials, then verify their validity against database table?

View 4 Replies

Web Services - Authentication Problem Between Webforms App And A Webservice?

Mar 4, 2011

I got a ASP.Net webforms app which is using Forms authentication. It needs to authenticate against a webservice which uses windows authentication (+ impersonation).

I've tried (amongst other things) to supply credentials by using:
service.Credentials = new NetworkCredential(myUserName, thePassword, theDomain)

The problem is that I get 401 from the webservice no matter what I try.

View 2 Replies

Security :: Accessing Webservice From Application With Windows Authentication?

Feb 10, 2011

I'm having trouble with accessing my webservice.

I've got a webapplication and inside this webapplication I have a webservice. An external program is going to use this webservice in the future, but for now that is not the problem. this webservice is also called from inside the webapplication. this is where the problem starts.

I keep getting this error:

The remote server returned an error: (401) Unauthorized.

I tried with imporsonate= true, but it didn't work

[Code]....

the webservice is called like this:

[Code]....

I hope some one can point me into the right direction.

I'm using iis 7.5asp.net 3.5

View 1 Replies

WCF / ASMX :: Call A Webservice On A Site That Requires Authentication?

Mar 3, 2011

I have a production web application that uses <authentication mode="Windows"/> I have added an .asmx page with a method in it. I'd like to test making calls to it from a separate client web app. When I do this I get the error: The request failed with HTTP status 401: Access Denied What do I need to do in my client app to access this webservice?

View 2 Replies

Ajax - Call An ASMX Webservice In Javascript Without Resetting Authentication Timers

Nov 23, 2010

Pinging back to a webservice in ajax from the client keeps the user's session alive, I don't want this to happen. More extensive summary For a website we're developing, we need the client to ping back (in js) to a webservice (ASMX) on the server (IIS7.5). This happens to let the server know that the user is still on the site, and hasn't browsed away to another site. This is as our customer wants to let users lock records, but if they browse away to other sites, then let other people take over those locked records. Perhaps the distinction between the client being on the site but inactive and on another site seems unimportant, but that's kinda irrelevant, I don't get to write the UI spec, I just have to make it work.

My problem is this, the ping stops the user from being timed out on the server through the standard forms authentication timeout mechanism. Not surprising as there is that 30 second ping in the background keeping the session alive. Even though we want to know if the user is still on the site, we want the normal forms authentication timeout mechanism to be honoured. I thought I might be able to fix this by removing the ASP.NET_SessionId and .ASPXAUTH cookies in the XMLHttpRequest that is the server ping, but I can't figure out how to do this. This is how my web service & method are defined:

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class PingWS : WebService
{
[WebMethod]
public void SessionActive(string sessionID)
{
// does stuff here
}
This is how I'm calling it in js (request is over HTTPS, :
$.ajax({
type: "POST",
url: "PingWS.asmx/SessionActive",
data: 'sessionID=' + aspSessionID + '}',
beforeSend: function (xhr) {
xhr.setRequestHeader('Cookie', '');
xhr.setRequestHeader('Cookie', 'ASP.NET_SessionId=aaa; .ASPXAUTH=bbb;');
},
dataType: "json"
});

I was trying with the setRequestHeader, but that just appends to the header rather than overwrites the header, and IIS is happy to ignore that junk I added. I'm thinking maybe I should be trying to do this at the server end, someone take PingWS.asmx out of the loop so that it doesn't keep the session active, but I'm not sure how to do this. Although the title of the question is focused on clearing the cookie in the header, I'd be super happy if anyone points out that I'm being really stupid and there is actually a much better way of trying to do what I'm doing.

I'm thinking at this stage maybe I need to add something to the webmethod that says how long this particular page has been inactive, and use that knowledge to timeout manually. That actually sounds pretty easy, so I think I'll do that for now. I'm still convinced that there must be an easy way to do what I originally wanted to do though. Update I'm thinking I'm pretty screwed in terms of cookie manipulation here as both the .ASPXAUTH and ASP.NETSessionId cookie are HttpOnly, which means the browser takes them out of your hands, you can't access them via the document.cookies object. So I would say that leaves me with:

Updating my SessionAlive webmethod to track each request so I can tell how long the user has been sitting idle on a page and timeout if needs be Marking the .asmx page somehow on the server end so that it's taken out of the normal authentication/session tracking flow I know how to do 1. so I'll start there but 2. seems much cleaner to me.

View 3 Replies

Java - Can A Webservice Be Secured With Authentication When Called From Ajax Client Side

Oct 31, 2010

How do I protect a webservice if it is called from ajax ?

Update: I realize that my question didn't reflect what I intended to ask. I don't want user to be able to do the request by pointing to it with its webbrowser but only in the context of my app.

View 2 Replies

Security :: Webservice Security And Windows Authentication - Invoke SSIS Packages From Web Service

Dec 15, 2010

I have to invoke SSIS packages from web service in the most secure way. I think that windows authentication will be secure but i am not sure. I do not have much knowledge about how to achieve this and the information on the internet is very distributed.

View 1 Replies

AJAX :: Throw Exception Message "Authentication Failed" When Call Webservice Form Javascript

Aug 16, 2010

I was created webservice which has a Method:

[Code]....

Then, in my aspx page, i call that method in javascript, but i get a Exception message is "Authentication Failed", code below:

[Code]....

How to resolve this problem?

View 3 Replies

C# - What's The Difference: Windows Authentication, Passport Authentication And Form Authentication

Sep 17, 2010

Just going to start making a web application and was wondering which was better, or at least what are the main differences between them (as it probably matters what I am using them for)?

View 3 Replies

Redirect IPhone To Another URL With C#?

Mar 25, 2010

How do you check if the user browsing my website is using an iPhone, and then redirect the user to another URL?

View 2 Replies

How To Use Silverlight Application On Iphone

Jun 2, 2010

We have develop one application in silverlight..

We want more information about how we can use this silverlight application on IPHONE.

Basic requirement is silverlight application should work on IPHONE.

View 10 Replies

.net - C# Check If It Is Ipad Or Iphone?

Mar 1, 2011

I'm using c# asp.net web how can I check if the user using ipad or iphone? How can I check the platform?

for example....the user enter the website from ipad and the page display hello ipad user

View 4 Replies

MVC :: Building Website For IPhone?

Jul 25, 2010

I would like to ask for advice how to build mvc web application for iPhone.

If you have any code sample, Good example how to start and get deep into it.

View 4 Replies

Mobiles :: IPhone 3 Development?

Jun 29, 2010

about iPhone3 development in dotnet, How can I start? what are the requirement for iPhone3 development?Also if posible provide me ebook.

View 6 Replies

IPhone Communication With Windows C# App?

Oct 28, 2010

I am create an iPhone app that needs to talk to a Windows C# app. The app will run as either a Service or Form Application.

What would be the best way to accomplish this? Ideally exposing a service-type architecture would be best as I don't need a stateful connection (stateless is fine in this case).

Can a WCF service hosted by my app using a form of TCP binding be consumed by my iPhone? Or can an app host using httpBinding without the aid of IIS or some other web server?

View 3 Replies

Iphone - Securing A WCF Web Service?

Mar 25, 2010

I have a asp.net website and I am accessing that web service from my iPhone app to get data.
The WCF web service produces data as JSON.I want to put some kind of authentication on the WCF. What you you guys recommend?

View 2 Replies

Mobiles :: IPhone Safari And The Viewport Tag?

Sep 28, 2010

I'm putting this tag at the header of my HTML pages, trying to get the page to stop vertical scrolling on mobile browsers like iPhone Safari:

View 2 Replies

Mobiles :: Developing Iphone Application?

Jun 4, 2010

I want develop small iphone blog application. How can i do it. I want steps should i follow? I am beginner for iphone application,

View 5 Replies

Mobiles :: How To Develop The Iphone Application

Mar 22, 2010

How to develop the IPhone Application using ASP.net. Which are the Softwares and Simulators we have to install to develop the application.

View 7 Replies

How To Show A Iframe In Iphone Application

Mar 17, 2011

how to show Iframe on iphone application i want to simply make sql base php page which shows the database record after login

View 1 Replies

Mobiles :: How To Create Application For Iphone

Mar 10, 2011

How to create application for iphone and mobile web application in asp.net?

View 5 Replies

Iphone - How To Set Session Variable In C# Using ContentUpdate?

Mar 22, 2011

I want to set a session variable like the following:

Session["mySession"] = "Some Value";

But I want to do so when clicking on a button, and using ContentUpdate:

protected void myButtonClick(object sender, EventArgs e)
{
Session["mySession"] = "Some Value";[code]....

The only way I can get it working on an iPhone is to set session variable is on the Page_Load function. It works when browsing from my computer.So, I guess my question is:How to set a Session Variable in C# Using ContentUpdate on an Iphone?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved