jsondotnetnukedotnetnuke-moduledotnetnuke-7

How to add manage temparory data in DotnetNuke?


I am beginner in DNN. I am creating a module which provides Login, Dashboard and Add-Update Form. I have data in JSON format. I want to store it temparory while user use the website. Data will be destroy as soon as user will close the website.

Currently I have created a folder in my Solution Explorer of project in Visual Basic and created 3 .json files which stores login_info.json, basic_info.json and auth_info.json. I write json data whenever user login and I make it blank when user logout.

Above method is working fine now but I afraid it will work when I will publish this module. Also I may have situation where I need to store image some where. I don't know how I will manage.

  1. Can anybody please guide me?
  2. Is this proper way to store data temparory in DNN?
  3. Is there any other better way?

After getting one of reply for Database Suggestion Is there any table which same as User Meta in DotnetNuke? enter image description here


Solution

  • You use the ConnectionString that is used by DNN and access the database as you would normally.

    DotNetNuke.Common.Utilities.Config.GetConnectionString()
    

    Or you can use the Data Access Layer that the DNN Framework supplies. For that take the Christoc Templates. In there is all you need to communicate with the DB.