Problem when calling the User Service to validate a user

Posted by Community Admin on 04-Aug-2018 15:11

Problem when calling the User Service to validate a user

All Replies

Posted by Community Admin on 26-Apr-2011 00:00

i'm tring  to validate a user from a page calling the User Webservice but I got troubles....
here's what's happening  :

protected void Page_Load(object sender, EventArgs e)
          Telerik.Sitefinity.Security.Web.Services.Users users = new Telerik.Sitefinity.Security.Web.Services.Users();
          Telerik.Sitefinity.Security.Credentials credentials = new Telerik.Sitefinity.Security.Credentials();
          credentials.UserName = "admin";
          credentials.Password = "1234567890";
          credentials.MembershipProvider = "IFProvider";
          //  credentials.Persistent = true;
              UserLoggingReason resaon = users.AuthenticateUser(credentials);
          catch (Exception ex)
              int i = 0; //Got exception pasted below

   at Telerik.Sitefinity.Security.Model.User.get_ProviderName()
   at Telerik.Sitefinity.Security.SecurityManager.AuthenticateUser(User user, UserManager manager, Boolean persistent)
   at Telerik.Sitefinity.Security.SecurityManager.AuthenticateUser(String membershipProviderName, String userName, String password, Boolean persistent, User& user)
   at Telerik.Sitefinity.Security.SecurityManager.AuthenticateUser(Credentials credentials)
   at Telerik.Sitefinity.Security.Web.Services.Users.AuthenticateUser(Credentials credentials)
   at SitefinityWebApp.IDEAPassThrought.Page_Load(Object sender, EventArgs e) in C:\Projects\SF_Credenziali\IDEAPassThrought.aspx.cs:line 27

I've noticed that in my implementation of IFProvider (the class that inherits from MembershipDataProvider) if I check for the Provider name I got an exception...

I've also tried using :

public IFProvider()
           if (System.Web.HttpContext.Current.Session != null && System.Web.HttpContext.Current.Session["ListaUtenti"] != null)
               ListaUtenti = System.Web.HttpContext.Current.Session["ListaUtenti"] as List<User>;
           providerDecorator = new EmptyDecorator();
           providerDecorator.Initialize("IFProvider", null, typeof(IFProvider));

can you please help me?

Posted by Community Admin on 28-Apr-2011 00:00

Hello Paolo,

You should make a web request. You can use

var wRequest = new Sys.Net.WebRequest();

Ivan Dimitrov
the Telerik team

Posted by Community Admin on 26-Nov-2013 00:00

how can i authenticate the sitefinity service call using web-request ?

i am facing the issue kind of issue as above i.e. unable to validate users while web service call?

thanks in advance!

Posted by Community Admin on 27-Nov-2013 00:00

Hello Neha,

You could check the following blog posts:
RESTful services in Sitefinity
Claims Authentication and Designing

I hope the information is useful.

Svetoslav Manchev

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed