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.0creating private assembly for dnn 4.9creating private assembly for dnn 4.9
Previous
 
Next
New Post
10/22/2008 10:20 PM
 
Ok, I got this to finally work! I changed my assembly name in the project properties to match my namespace that I used in all my files. The namespace was Company.Modules.StudentInformation so now my assembly compiles to Company.Modules.StudentInformation.dll in the dnn\bin folder. I also left the default namespace empty in the project properties where as previously I had it filled in. Past this, in the .ascx files I removed the code file="StudentInformationView.ascx.vb" syntax from all .ascx files. Thanks to everyone for the help! Bruce, I still am curious to see why you prefer the class library project instead of the wap project so am looking forward to your reply on that one since I'm still new to dnn module development.
 
New Post
10/23/2008 4:27 AM
 

you should replace the string "company" with your own (virtual) company's name to avoid possible naming conflicts with other developers!


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/23/2008 10:48 AM
 

When using a VB.NET project, the Root Namespace property of the project is not the same as the Default Namespace project property for C# projects.  The root namespace will get prepended to any namespace you declare, so when you wrapped the class StudentInformationView in the namespace Company.Modules.StudentInformation, your project was converting that namespace to Company.Modules.StudentInformation.Company.Modules.StudentInformation, which is why it couldn't find the referenced class.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
10/23/2008 2:32 PM
 
Thanks for the clarification on root namespace... sometimes I get a little confused going from c#.net to vb.net. Now I am getting a DataProvider error in my project. The variable Dataprovider is ambiguous with DotnetNuke.Data and mine is at Company.Modules.StudentInformation namespace in the abstract class DataProvider. I have a SQLDataprovider that inherits DataProvider but will not work... it is a name collision. I have tried fully qualifying my DataProvider by Company.Modules.StudentInformation.DataProvider.Instance() but then I get the error:

ex.Message() "The type initializer for 'Bla.Modules.MyModule.DataProvider' threw an exception." String
+ InnerException {"Value cannot be null.
Parameter name: type"} System.Exception

I've researched this for a while and most say it is a web.config setting or a namespace situation but I cannot seem to figure it out.

I am using a wap project... am I missing some reference to a dotnetnuke dll? I tried adding a reference to DotNetNuke.SQLDataProvider.dll in my asp.net project but it is still erroring.

The custom module compiles, installs fine, works rendering pages and so forth, but it errors every time it goes to use my custom sqlDataprovider to hit the db.

I know this is a common error, the data provider ambiguous name, but what else can I look for to fix this up so my custom sql data provider will work? What steps should I review to see what I am missing?

Most people do not have to fully qualify their inherits statement for inheriting DataProvider in the SQLDataProvider class but I even tried fully qualifying it and the ambiguous error ws was still present!

I.E...

Public Class SQLDataProvider()
Inherits Company.Modules.StudentInformation.DataProvider

What am I missing?

Thanks for any help!
 
New Post
10/23/2008 3:51 PM
 

Typically a type initializer error occurs when there's a naming issue with the SqlDataProvider.  The DataProvider Instance method tries to create a SqlDataProvider based on the information in the web.config and your current namespace.  So, you should be calling Reflection.CreateObject("data", "Company.Modules.StudentInformation.DataProvider", "Company.Modules.StudentInformation") if you are trying to instantiate Company.Modules.StudentInformation.DataProvider.SqlDataProvider from the assembly Company.Modules.StudentInformation (assuming the data section in your web.config is using the SqlDataProvider provider).  I'm not entirely sure how reflection works with VB, but you might also try checking the casing on your SqlDataProvider, lower-casing SQL.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0creating private assembly for dnn 4.9creating private assembly for dnn 4.9


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