Monday, March 26, 2012

proxy and authentication services

Hi All,

I'am testing some features of AJAX Library and also the services that they offer. I have a question about this service. where does this service run and how do i point it to my SQL database where my users are stored. i think in the web.config but show some code please.

Kind regards,

Well i read some info from another thread.and saw that you can use your own webservice. So i want to use my own webservice, but in this example its pointing to a webservice only and not his method. How does this work? how do you configure it to go to the right login method. Thanks in advance

Yes, you can use your own authentication Web service.
You configure the path to your own Web service like it's shown in this link:http://ajax.asp.net/docs/mref/595cde79-7340-40f0-ba08-2efaff3d4d0c.aspx

Your web service needs two methods Login and Logout:

using System.Web.Services;
using Microsoft.Web.Script.Services;

[ScriptService]
public class MyAuthenticationService : System.Web.Services.WebService
{
[WebMethod]
public bool Login(string userName,
string password,bool createPersistentCookie)
{
//Place code here.
return true;
}

[WebMethod]
public void Logout()
{
//Place code here.
}
}

This same code will be shown in the next release of the documentation.

Hope this helps,

MaĆ­ra


Hi Maira,

Thanks for your reply. So the only thing thats left to do is changing the path of your authentication service?

Kind regards,


Besides that, you need to enable the authentication service in the configuration file. (I don't know if you already did)


Hi Maira,

Yes i already enabled the authentication service in my configuration file. thanks for your info

Regards

No comments:

Post a Comment