Robert Ray
Robert Ray

Reputation: 127

Send Data Via Http In C#

I am creating Android Application for a school where teachers should be login to the android application and perform some activity on daily basis.

We have a complete existing web based solution for the same and now want to implement same in Android.

The application is developed in Asp.net and C#

To authenticate a user on android login, I have created a login API which takes username and password in the query string and in return the API return Json Data From That User.

example : www.yourdomain.com/authenticateuser.aspx?username=xxxx&pas=YYYYY

But I doubt whether its safe to send the data via query string. Can anybody suggest a better possible way where it is not mandatory to send the data in Query String.

Upvotes: 0

Views: 555

Answers (2)

user456118
user456118

Reputation:

You can use Soap based web-service. I created a demo to consume Soap Web-service without KSoap Library.

Ref Link: SoapWithoutKSoap

You can use KSoap Library to create complex Soap Data Request.

I hope this can help you.

C# Web-Service: Demo and Demo1

UPDATE

Web Service Link will be something like this : http://123.456.789.012/Abhan/Abhan.asmx?op=JustTest (This is not working as I modified the IP Address)

In Browser, method name and passing parameter(s) information will be like something as attached image.

ASP.Net Service

Thanks.

Upvotes: 2

Seraphim's
Seraphim's

Reputation: 12768

I'm using C# web services to autenticate users, send report data and get app updates.

You can get some exmaples in the web (C#):

http://msdn.microsoft.com/en-us/library/8wbhsy70%28v=vs.90%29.aspx

and ksoap2 for Android:

http://code.google.com/p/ksoap2-android/

But I also bought a SSL certificate to use https...

Upvotes: 0

Related Questions