Hi,
I found out that i need to use these API:
DotNetNuke.Security.Membership.
UserLoginStatus loginStatus = UserLoginStatus.LOGIN_FAILURE;IPAddress localIPAddress = NetworkInterface.GetAllNetworkInterfaces()[0].GetIPProperties().UnicastAddresses[0].Address;UserInfo objUser = UserController.ValidateUser(1, username, password, "DNN", "", "Operations", localIPAddress.ToString(), ref loginStatus);
Now, the problem is that when it tries to run the ValidateUser an exception take places: Here are the details: (with InnerExceptions)
{"The type initializer for 'DotNetNuke.Entities.Users.UserController' threw an exception."}
{"The type initializer for 'DotNetNuke.Security.Membership.MembershipProvider' threw an exception."}
{"The type initializer for 'DotNetNuke.Services.Cache.CachingProvider' threw an exception."}
{"Value cannot be null.\r\nParameter name: type"}
I think it may be that i don't have either a reference dll or a configuration but i don't know, so here is the provider section of my configuration:
<
<
<
<
<
</
</
membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="15">providers>clear />add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" passwordformat="Encrypted" applicationName="DotNetNuke" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />add name="DNNSQLMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false" passwordformat="Encrypted" applicationName="DotNetNuke" description="Stores and retrieves membership data from the local Microsoft SQL Server database" />providers>membership>
Any help is appreciated.
thanks,
bramoin