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.0Module Upgrade Wizard - DataProvider ExceptionModule Upgrade Wizard - DataProvider Exception
Previous
 
Next
New Post
1/17/2007 12:24 PM
 

Hi,

I have just upgraded my site from DNN 3.3.5 to 4.4 including our custom modules from 3.x to 4.x using module upgrade wizard.

When i browse to the custom module, i get the following error after upgrade:

Error: Online Advice Services is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for 'CSeGuidance.DataProvider' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CSeGuidance.DataProvider' threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey, Boolean UseCache) in C:\Websites\CivvyStreet_source\Library\Components\Framework\Reflection.vb:line 254 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName, Boolean UseCache) in C:\Websites\CivvyStreet_source\Library\Components\Framework\Reflection.vb:line 189 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) in C:\Websites\CivvyStreet_source\Library\Components\Framework\Reflection.vb:line 94 at CSeGuidance.DataProvider.CreateProvider() in C:\Websites\CivvyStreet_source\Website\App_Code\CSeGuidance\DataProvider.vb:line 20 at CSeGuidance.DataProvider..cctor() in C:\Websites\CivvyStreet_source\Website\App_Code\CSeGuidance\DataProvider.vb:line 15 --- End of inner exception stack trace --- at CSeGuidance.DataProvider.Instance() at CSeGuidance.QueryController.GetAllQueries(Int32 UserID) in C:\Websites\CivvyStreet_source\Website\App_Code\CSeGuidance\QueryController.vb:line 31 at CSeGuidance.ViewQueries.FillDataGrid() in C:\Websites\CivvyStreet_source\Website\DesktopModules\CSeGuidance\ViewQueries.ascx.vb:line 65 at CSeGuidance.ViewQueries.Page_Load(Object sender, EventArgs e) in C:\Websites\CivvyStreet_source\Website\DesktopModules\CSeGuidance\ViewQueries.ascx.vb:line 47 --- End of inner exception stack trace ---

I am not sure how much difference does the directory structure in the App_Code makes. The wizard has created the following structure:

App_Code >>> Module Name >>> Providers.......... >>> SqlDataProvider.vb
                                            >>> Code >>> (DataProvider.vb, info, controller classes etc.)

I have tried placing all files under Module Directory under App_Code and also tried placing Providers directory under DesktopModules/Module Name directory but no difference.

Following is my code from data provider which i believe is fine:

#

Region "Shared/Static Methods"

 

' singleton reference to the instantiated object

 

Private Shared objProvider As DataProvider = Nothing

 

' constructor

 

CreateProvider()

 

Shared Sub New()End Sub

 

' dynamically create provider

 

objProvider =

 

Private Shared Sub CreateProvider()CType(Framework.Reflection.CreateObject("data", "CSeGuidance", "CSeGuidance"), DataProvider)End Sub

 

' return the provider

 

 

 

Public Shared Shadows Function Instance() As DataProviderReturn objProviderEnd Function

#

End Region
Any help would be greatly appreciated.
Regards
Arif Shah

 

 
New Post
1/18/2007 8:16 AM
 

Try changing this line to:

Private Shared Sub CreateProvider()CType(Framework.Reflection.CreateObject("data", "CSeGuidance", ""), DataProvider)End Sub



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
1/19/2007 9:39 AM
 
Thanks very much. That did the trick for me.
 
New Post
1/19/2007 12:31 PM
 

The wizard manages the movement of files.  It also makes changes to the codebehind attribute and a few other simple housekeeping tasks. 

However, it makes no attempt to modify any code you may have (too many variables), and unfortunately the dynamic module it creates needs the fix Michael suggests, fo Dataproviders.


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Upgrade Wizard - DataProvider ExceptionModule Upgrade Wizard - DataProvider Exception


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