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 Issues please HELP!Module Upgrade Issues please HELP!
Previous
 
Next
New Post
2/1/2007 4:40 PM
 

I've updated five modules by following the module upgrade wizard document so I can use the App_Code directory rather than using a pre-compiled dll.  On the exterior all seems to be well, but I get a series of exceptions in the log.  The first exception is a System.IO.FileNotFoundException.  It can't find the file name 'DotNetNuke.Modules.Html' at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimTypeHandle.GetTypeByName(String nam, Boolean throwOnError, Boolean ignoreCase, Booean reflectionOnly, StackCrawlMark& stackMark) etc. and it keeps going on into a nice stack trace.  The line of code that is causeing the exception is line 241 of Library\Components\Framework\Reflection.vb.  This is what is on that line of code 

objType = BuildManager.GetType(TypeName, True, True).  Because this is returning nothing, it is causing a null pointer exception further down the line.  This did not happen before I did the module upgrade, I believe it is because it is looking for the dll in the bin folder which is no longer there.  I get the same exception for every module that I have converted/upgraded. Has anybody run into this, or know a way around it, I can't have all these exceptions occuring everytime the site gets a hit.

 
New Post
2/1/2007 9:36 PM
 

Change code you have like:

CType(Framework.Reflection.CreateObject("data", "MyModule", "MyModule.dll"), DataProvider)

To:

CType(Framework.Reflection.CreateObject("data", "MyModule", ""), DataProvider)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
2/1/2007 11:53 PM
 

Thanks for the quick response. I found that fix in another forum, and applied it to the CreateProvider() method in the DataProvider.vb file for each module that I converted.  Are there more places that I should make that change?  Also, I noticed something that is extremely odd, it doesn't throw the series of exception every time, it seems to happen when there is nothing in the cache.  Also, I noticed that it is pulling the data that is being passed into the BuildManager.GetType() (Reflections.vb line 241) method call from the database.   The value looks something like this: "DotNetNuke.Modules.Html.HtmlController, DotNetNuke.Modules.Html". 

 
New Post
2/2/2007 10:59 AM
 
I solved my problem, it wasn't very straight forward, but it now works without a hitch.  The problem is that by default, the core modules are installed to use the precompiled dll's.  So, in the *.dnn file it has an xml tag for the businesscontrollerclass, which looks like this: <businesscontrollerclass>DotNetNuke.Module.ModuleName.ModuleController, DotNetNuke.Module.ModuleName</businesscontrollerclass>.  The inner string is being placed in the database, and when the modules controller is being loaded, it takes that value and passes it into BuildManager.GetType(objType,True,True).  BuildManager is then looking for the module assembly inside of the bin folder, when it should be looking within the app_code directory. I removed DotNetNuke.Module.ModuleName from the string to make it look under the app_code directory.  If anybody else is having similar problems I suggest checking out this article forums.asp.net/thread/1114393.aspx, it was posted by Shaun Walker.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Upgrade Issues please HELP!Module Upgrade Issues 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