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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Need help with C# module setup, please help.Need help with C# module setup, please help.
Previous
 
Next
New Post
7/19/2006 3:32 PM
 

Let me start by describing what i've done to setup the enviroment.

  1. I'm using visual studio 2005 on a windows 2003 server with the dnn site setup on the local IIS 6.0 server.
  2. I've got the Dot Net Nuke source setup then i have a project under the DotNetNuke source solution which is a local website project and contains the live dnn site.
  3. I've created a sub directory under appcode called CSharp and added it to the codedom line in web.config.  I've then added a folder with my module name under CSharp.
  4. Next I added a dataprovider.cs, modulenameinfo.cs, modulenameController.cs, SqlDataProvider.cs to that folder.
  5. Then I created a folder under Desktop Modules that contains my ascx files with the source files. 
  6. I filled all the files with the approiate code and references.

First off has anyone managed to impliment a successful module following the above pattern that was not based off a separate project in visual studio?

Let me start by saying that my module loads, and i can enter data into the form and click save.  Using the debugger i've stepped through the code and found that the module throws an exception when trying to load an instance of my sql data provider.  Error Message: The type initializer for 'WSYSA.Modules.Facility.DataProvider' threw an exception.

Here is the debugger exception detail

System.TypeInitializationException was unhandled by user code
  Message="The type initializer for CompanyName.Modules.Facility.DataProvider' threw an exception."
  Source="App_SubCode_CSharp.fviioplt"
  TypeName="CompanyName.Modules.Facility.DataProvider"
  StackTrace:
       at CompanyName.Modules.Facility.DataProvider.Instance()
       at CompanyName.Modules.Facility.FacilityInsuranceApplicationController.Add(FacilityInsuranceApplicationInfo objFacilityInsuranceApplication) in c:\Inetpub\wwwroot\DotNetNuke\WebSite\App_Code\CSharp\Facility\FacilityInsuranceApplicationController.cs:line 24
       at CompanyName.Modules.Facility.ViewFacilityInsuranceApplication.AddApplication(Object sender, EventArgs e) in c:\Inetpub\wwwroot\DotNetNuke\WebSite\DesktopModules\Facility\ViewFacilityInsuranceApplication.ascx.cs:line 75
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

then the inner exception is "Value cannot be null.\r\nParameter name: type"

All my code is in the namespace CompanyName.Modules.Facility.  Has anyone else ran into this issue.  Do I need to make a separate project for my SQL data provider?

 

 
New Post
7/19/2006 8:15 PM
 

I've seprated my code into three projects, the ascx controls are in the asp.net Folders, the sql data provider is in a project by itself, then my business logic is in a Library class. That seems to work but if there is a way to do it without seprate prjects i'd like to know.

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Need help with C# module setup, please help.Need help with C# module setup, please help.


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