1

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.

RBK
  • 558
  • 5
  • 16

1 Answers1

1

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.

Joe Craig
  • 1,244
  • 1
  • 7
  • 7
  • Hi Joe Craig, Thank you so much for your response. As you mentioned, like create an installable package, and then reinstall the module. I am not aware of this process. Is there any link available to create a package and reinstall it onto my project. Could you please guide me on this. It would be more helpful and appreciable. Thanks in advance. – Shiyamala Jeyaraman Feb 28 '19 at 06:20
  • Start with the Professional DNN books from Wrox and available on Amazon. These will provide you with the details of the DNN architecture. Professional DotNetNuke Module Programming by Mitch Sellers is a good one, too and will orient you to actually building modules. I'd also recommend the free Module Development Templates from Chris Hammond (Christoc) that you can download from store.dnnsoftware.com. Also lots of resources at dnnsoftware.com, especially the wiki. There is also a Documentation Center that is being developed that has useful information. – Joe Craig Feb 28 '19 at 15:02
  • Thanks a lot for your precious time and guidance Joe. – Shiyamala Jeyaraman Mar 05 '19 at 03:41