I am new to DotNetNuke Framework. Currently working on DNN 07.04.01 (280) version.
Problem :
Changes made in the DNN source file doesn't even get recognized when I run it.
I am working on "UserAccounts" module. We have controller called "UserController.cs". I cannot able to add or edit this source file , meaning I can able to change the code but it doesn't affect the changes while debugging the file, it executes the same older code and not even recognize the new code.
It may be a strange but I am facing this.
What I have tried :
I tried to search in DNN forums based on this issue but there is no hope.
Is there any solution to resolve this issue? It would be appreciable. Please help us to get into this.
public HttpResponseMessage Update([FromBody] JObject jsonData)
{
var user = jsonData.ToObject<CMSUser>();
var password = user.Password;
var apiToken = user.Token;
HttpResponseMessage response;
var pwd = password;
//dynamic json = jsonData;
//JValue apiToken = json["apiToken"];
//JObject userJson = json["user"];
if (password == null ||
apiToken == null ||
InitializeApiRequest(apiToken.ToString(CultureInfo.InvariantCulture)) != null)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, ApiResponse);
}
//var user = userJson.ToObject<CMSUser>();
UserInfo dnnUser;
//HttpResponseMessage response;
if (!UpdateDnnUserWithCMSUser(user, out dnnUser, out response)) { return response; }
try
{
DotNetNuke.Entities.Users.UserController.UpdateUser(PortalSettings.PortalId, dnnUser);
ApiResponse = new DnnApiResponse(true, "User Updated", user);
}
catch (Exception e)
{
ApiResponse = new DnnApiResponse(false, "User Update Failed: " + e.Message);
}
return Request.CreateResponse(HttpStatusCode.BadRequest, ApiResponse);
}
I hope I am clear with the question I have asked. Please help me to get over with it.
DNN is mostly compiled and code resides in the various DLL files.
If you are making changes to the User Accounts module, you'll need to recompile the module, create an installable package, and then reinstall the module.
Just as a side note, making changes to core functionality is a risky proposition, as changes will be overwritten any time you upgrade. You'd be better advised to create your own version of any modules, and install them to replace the core functionality. Then, you'll mostly be guaranteed that you are using a "stock" DNN and you won't lose changes when upgrading.
As a side, side note you should know that the current version of DNN is 9.x. If at all possible, it makes sense to use the current version.