Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Best Practice: Passing Data Between Pages and ModulesBest Practice: Passing Data Between Pages and Modules
Previous
 
Next
New Post
10/2/2006 3:17 PM
 

I'm designing a new site from scratch and I am writing all of the modules myself. I need to be able to pass data between pages and modules. For example, one page will list all of the customers in the system. Selecting a customer will take you to another page with various customer related modules (address info, employee contacts, account balances, etc). Each of these areas will be a specific module with its own view/edit controls and they each need to know what the currently selected CustomerID value is. Some of the customer modules may lead to child pages with more customer specific modules and so the CustomerID data has to persist through all of them. What is the best way to do this?

My current site uses a lot of querystring parameters. I know DNN supports this and so that is an option but it leads to security concerns for me. First, users can manually manipulate the querystring and attempt to gain access to customer accounts that their security role would not normally allow. I can guard against that through additional checks on each page but I'd rather not have to deal with the extra code if i don't have to.

Another option is session variables which works well except for one problem. I'd like the user to be able to open a new browser window while using the site and be able to access a different customer in each window. If the user opens a new instance of their browser, this will work fine. But if (in IE) the user hits Ctrl + N and open a new copy of the same process, the session variables are shared between both windows. So if he is looking at customer1 in window A and then opens window B and views customer2, the session variable back in window A will now point to customer2 and any updates made for customer1 will actually be applied to customer2. So, session variables are out.

Cookies have the same issue as session variables as changing one browser window will affect the cookies for any other browser windows currently open. So, cookies are out.

I'm still fairly new to DNN so I don't know what other options there are. Can someone offer some advice on how to accomplish this? Links to sample code or MSDN articles would also be greatly appreciated. Thanks!

 
New Post
10/2/2006 10:27 PM
 
elroyskimms wrote

My current site uses a lot of querystring parameters. I know DNN supports this and so that is an option but it leads to security concerns for me. First, users can manually manipulate the querystring and attempt to gain access to customer accounts that their security role would not normally allow. I can guard against that through additional checks on each page but I'd rather not have to deal with the extra code if i don't have to.



You need to do the checking yourself.  I would not expect any framework to read your mind as to what security measure to apply...  The DNN framework does all the work for you as far as role assigments and management concern.  It's up to you to design what to do for a given role.
 
New Post
10/2/2006 10:33 PM
 

I apologize if my post was not clear. I know that when using querystring parameters, I need to validate all of the parameters for security and content.

What I'm asking is if anyone knows a better way besides querystring parameters. If you know a better way, I'd appreciate any references to articles, sample code, or MSDN links.

 
New Post
10/2/2006 11:46 PM
 

You can store the data you want to pass in the database with the UserID as the key, then access the data as needed in the different modules.

If the user isn't logged in, you can use a guid stored as a cookie and key in the database's table.

 
New Post
10/2/2006 11:50 PM
 
kjparker wrote

You can store the data you want to pass in the database with the UserID as the key, then access the data as needed in the different modules.

If the user isn't logged in, you can use a guid stored as a cookie and key in the database's table.

Great suggestion. This would prevent users from tampering with the data. But if the user opened multiple browser windows, how could I distinguish between each window?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Best Practice: Passing Data Between Pages and ModulesBest Practice: Passing Data Between Pages and Modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out