如何使用.Net Webservice从移动应用程序获取用户名和密码
我是webservices的新手,我有一个要求,比如我需要从移动应用程序获取用户名和密码,并通过破解密码并在sql中比较该密码,我需要说明用户详细信息是否正确,如果凭据是正确的我需要向移动应用程序发送yes,以便它允许用户登录。谁能建议我怎么做。
提前致谢
Divya
I am new to webservices, i got a requirement like i need to get username and password from mobile application and by decrepting the password and comparing that password in sql, i need to say whether the user details are correct or not, if the credentials are correct i need to send yes to mobile application so that it can allow user to login. can anybody suggest me how to do that.
Thanks in advance
Divya
我希望通过webservice从移动应用程序获取用户名和密码
i want to get username and password from mobile application through webservice
使用 POST
编写服务启用方法,该方法将使用用户名和密码。然后使用 ADO.NET
对象连接SQL,并通过查询将这些详细信息与用户表进行匹配。
如果匹配,返回 true
,否则 false
。
Write a Service with POST
enabled method, which would take username and password. Then connect with SQL using ADO.NET
objects and match those details with user table by a query.
If matched, return true
, else false
.
您需要创建 RESTful [ ^ ]服务。
请参阅以了解如何创建RESTful服务 -
使用C#开发REST Web服务 - 演练 [ ^ ]
设计和构建RESTful Web指南使用WCF 3.5的服务 [ ^ ]
请参阅此消费来自移动应用程序 -
http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html [ ^ ]
HTTP://www.asp。 net / web-api / overview / mobile-clients / calling-web-api-from-a-windows-phone-8-application [ ^ ]
https:// AZU re.microsoft.com/en-in/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/ [ ^ ]
WCF和Android第一部分 [ ^ ]
WCF和Android:第二部分 [ ^ ]
https://wyousuf.wordpress.com/2012/03/01/android-with-wcf-services / [ ^ ]
-KR
You need to create RESTful[^] service.
Refer this for how to create RESTful service-
Developing a REST Web Service using C# - A walkthrough[^]
A Guide to Designing and Building RESTful Web Services with WCF 3.5[^]
Refer this for consuming from mobile application-
http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html[^]
http://www.asp.net/web-api/overview/mobile-clients/calling-web-api-from-a-windows-phone-8-application[^]
https://azure.microsoft.com/en-in/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/[^]
WCF and Android Part I[^]
WCF and Android: Part II[^]
https://wyousuf.wordpress.com/2012/03/01/android-with-wcf-services/[^]
-KR