I have a webpage that I am calling that works fine on my local server. When I put it on the remote server at my hosting site, I get the following error:
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error (LINE 13):
Line 11:
Line 12: UserLoginStatus loginStatus = UserLoginStatus.LOGIN_FAILURE;
Line 13: DotNetNuke.Entities.Users.UserInfo objUser = DotNetNuke.Entities.Users.UserController.ValidateUser(0, userName, password, "DNN", "", "test", "204.14.91.25", ref loginStatus);
Line 14:
Line 15: if (loginStatus == UserLoginStatus.LOGIN_SUCCESS) {
Source File: d:\hshome\nickfox\test.com\portal\DesktopModules\DataServices\GetUserID.aspx.cs Line: 13
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
DotNetNuke.Security.Membership.AspNetMembershipProvider.UserLogin(Int32 portalId, String username, String password, String authType, String verificationCode, UserLoginStatus& loginStatus) +138
DotNetNuke.Entities.Users.UserController.ValidateUser(Int32 portalId, String Username, String Password, String authType, String VerificationCode, String PortalName, String IP, UserLoginStatus& loginStatus) +47
DesktopModules_DataServices_GetUserID.Page_Load(Object sender, EventArgs e) in d:\hshome\nickfox\test.com\portal\DesktopModules\DataServices\GetUserID.aspx.cs:13
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Here is the source code causing the problem:
using System;
using DotNetNuke.Security.Membership;
public partial class DesktopModules_DataServices_GetUserID : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string userName = Request.QueryString["userName"];
string password = Request.QueryString["password"];
int userID = 0;
UserLoginStatus loginStatus = UserLoginStatus.LOGIN_FAILURE;
DotNetNuke.Entities.Users.UserInfo objUser = DotNetNuke.Entities.Users.UserController.ValidateUser(0, userName, password, "DNN", "", "Lectricsheep", "204.14.91.25", ref loginStatus);
That is the line causing the error. I can't see what objec it may be complaining about. Please help.
thanks
Nick