I have to build a web interface using Sybase 11 backend. The database already has users and passwords that are generated by another application using GRANT CONNECT or ADD_USER statements. Is there a way to validate users against this database without having to create a full membership provider?
asked 23 Nov '10, 14:42
I'm not familiar with ASP.Net MembershipProvider, but an alternative would be to create an SA web service with AUTHORIZATION ON and then attempt do a web service call to the SA web service providing the user ID/PWD to verify that the credentials were correct.
Then start the SQL Anywhere server using "-xs http" switch
Then send a request to http://username:email@example.com/Validate_User (or equivalent using Ado.Net). If the credentials are correct, you will get an "OK" response back. If not, you will get an error back.
Of course, you should use HTTPS so that the credentials are transferred securely and therefore you should add "SECURE ON" to the web service definition. (Exercise left to the reader - see "-xs https" server switch in the docs :-).
answered 23 Nov '10, 21:00
If you talk about ASP.NET MembershipProvider it is not so much effort to do this. You have to implement only the ValidateUser function to get it working. Only in the case that you want to allow the user to do self-administration than you will have to implement the rest too.
you get the user and password in clear text and can use this e.g. in an
If you can afterwards open the connection without an exception you know that the credentials have been the right ones.