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 ExtensionsProvidersProvidersDataProvider ErrorDataProvider Error
Previous
 
Next
New Post
1/18/2010 1:02 PM
 

Hi Brandon, Thanks again!

Brandon Haynes wrote:

If you're running a windows service, you'll need to make sure you include the relevant provider metadata from the configuration/dotnetnuke section of your web.config.  Without this metadata (e.g. configuration/dotnetnuke/data), I would expect to see the error you are reporting.

You wouldn't happen to have a (web)reference on this issue? Or may be you could give some general guidelines on how to proceed or may be one example?

Brandon Haynes wrote:

The SqlDataProvider assembly (and the DotNetNuke assembly) will also need to be deployed with your windows service.

Both are included in my bin\debug directory and are referenced in MyService.

 
New Post
1/19/2010 5:38 AM
 

I hope I'm not over asking.

Your remark about "make sure you include the relevant provider metadata from the configuration/dotnetnuke section of your web.config" is not completely clear to me. I can locate the information in the web.config file, but how to include those in my windows service is kind of a puzzle.

 
New Post
1/19/2010 9:57 AM
 

Hi Gvdamn,

I'm not aware of any written guidance on this issue.  It is a bit of an out-of-scope usage for DotNetNuke (which is designed to be a web application, not function as a Windows service).  In addition to the configuration issues you have run into, you will also experience the occasional error due to a lack of httpContext.  I do, however, know that this sort of thing is possible (because I've done it).  However, I would classify it as an advanced activity, and due to the difficult-to-diagnose nature of the problems that result, it will be difficult to give the sort of highly-specific guidance that is most helpful.

When I refer to the DotNetNuke data provider metadata, I am referring to the configuration/dotnetnuke/data node.  DotNetNuke needs access to this node in order to instantiate the correct provider (in this case, a SQL provider).  When you leverage DotNetNuke outside of a web application, .NET will look for this in the associated app.config (either app.config or ExecutableFilename.exe.config).  You'll need to add this key to that configuration file.

Due to the fickle method by which DotNetNuke instantiates a provider, it is likely that you will still run into errors after you've moved the key across.  In this event, I suggest (a) linking to the source version of DotNetNuke so that you can step into the relevant functions (and see what is going awry), or (b) temporarily moving the relevant methods (e.g. DotNetNuke.Reflection.CreateObject) into your projects so you can trace into them without building the full DotNetNuke source package.  Both methods are fine, but require some additional work.

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsProvidersProvidersDataProvider ErrorDataProvider Error


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