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

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHow do you only allow Module to be used in localhostHow do you only allow Module to be used in localhost
Previous
 
Next
New Post
7/15/2010 10:32 PM
 
Hello All,

I've very new to DNN module development, let alone programming in general, so this maybe an easy question for some but I can't seem to find the answer.  I'm in the process of creating my first module, well I've got a template and good idea, anyway when I create this module I want to be able to allow users to test it, but only on the localhost, for now. 

First, how do I accomplish that, and Second, is that something I need to worry about at the start of my project or is it a simple tweak here or there to allow it to work in either a dev or production environment?

Thanks,
Bob

Thanks,
Bob
 
New Post
7/15/2010 11:42 PM
 
That's not something I've ever considered doing as it would be better during testing to grant view and possibly edit permission only to the roles or individual users allowed (whether on localhost or connecting remotely) to test the module.

If you do have to confine testing of the module by the anonymous user to localhost you could examine the Request.ServerVariables collection for the values for the "remote_addr" or "remote_host" keys either hide the module or redirect to the framework's AccessDeniedURL with appropriate message.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
7/16/2010 12:19 AM
 

Thanks for the reply Bill...

I do want to grant view and edit permission based on the roles or individual users who would be allowed to normally view and/or edit the module settings or data, whether on a localhost or using on a normal production/live server.  

I just want to incorporate the feature that a lot of developers do now, that allow folks to test drive a module before actually purchasing it.  Like a demo, of sorts, but it would only work on the localhost vs someone installing in on their active server.

Would that still be the "Request.ServerVariables collection" you mentioned?

Obviously based on my other post I'm not anywhere near ready for this feature, but didn't know if that's something I should do from the beginning or if its something I could add in, fairly easy, down the road.

Thanks,
Bob

 
New Post
7/17/2010 6:21 AM
 
Error 106 Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. ' what is this?
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHow do you only allow Module to be used in localhostHow do you only allow Module to be used in localhost


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