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...Building ExtensionsBuilding ExtensionsModulesModulesDNN DLL Reference ConfusionDNN DLL Reference Confusion
Previous
 
Next
New Post
8/7/2010 9:32 PM
 
I've been able to successfully build modules when I'm working on my LAN and have mapped drive access to my DNN installation. In other words - when I'm working on my module located directly in the DesktopModules folder.

I'm now trying to work on module development with our new hosted DNN installation and I'm confused.

When I'm developing locally - I add a reference into my module project to the DotNetNuke DLL that is in the BIN folder of my local DNN installation.

Pardon my ignorance, but how does this work when I'm developing locally, but want to upload to a server. It seems that when I use a reference to my local DNN DLL and then upload/install my code (via the MODULE DEFINITIONS option) - I get "DotNetNuke.Services.Exceptions.ModuleLoadException: Could not load type." errors. Which I think indicate that the DLL I've referenced doesn't match the one in the hosted installation of DNN. Is that what these errors mean?

So - what is the approach? Do you simply leave out the DNN references from one's custom module? Will my code (ripe with warnings/errors in Visual Studio due to the missing reference) magically work when I upload it - because it will simply use the DNN.DLL that is already in use by the hosted DNN install?

And what is best way to use the DNN.DLL in non-module projects?

For example - I need to create an ASP.NET web app that sits in a directory parallel to my DNN installation. This will auto-login the visitor using a specific account with extremely limited rights and then redirect them, based on URL parameters, to one of the two pages they can view with this limited account.

I've got my head around all of the mechanics of this task, except the authentication I need to do. DNN uses ASP.NET membership - so I need to use the DNN.DLL to authenticate my user, right? I've tried doing that (see code below), but run into errors like "Cannot register or retrieve components until ComponentFactory.Container is set".

DotNetNuke.Entities.Users.UserInfo userToAuth = new DotNetNuke.Entities.Users.UserInfo();
userToAuth.Username = "user";
userToAuth.Membership.Password = "pass";
UserController.ValidateUser(userToAuth, portalId, false);
// also tried (UserInfo objUserInfo = UserController.ValidateUser(0, "user", "pass", "", "", Request.UserHostAddress, ref loginStatus);)

I'm new to DNN, but finding it to be a great framework. I just can't seem to get my head wrapped around the "bridge" between my code and the framework's.

Any guidance you wise folks might offer would be greatly appreciated.

~ Greg


 
New Post
8/8/2010 4:47 AM
 
you should reference Dotnetnuke.dll in bin folder, using a relative path ("../../../bin/dotnetnuke.dll"). To access DNN from outside the website, either use webservices or access database directly. to access MS membership data, add membership component to your application with same machine key in web.config (and same or different application id, depending on your needs).

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN DLL Reference ConfusionDNN DLL Reference Confusion


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