I have several DNN modules that I want to update silently using the built-in tools for updating the portal module called from a separate application, in this case Windows services. I was able to do all this with version 4.3 of the portal by changing the DNN source in key areas to allow DotNetNuke.dll to function outside of the web application. I am now trying to do the same with 4.9.0 source code and I am having problems.
Everything works fine until the DNN tries to read from the database. I have a Windows service project, a DNN library project, and several other related projects loaded into one VS solution (additional projects are the same as in the main solution file supplied with the DNN source). I call PaInstaller. Install an update for each module in my service. The execution gets a .vb reflection and then tries to create a DotNetNuke.Data.SqlDataProvider object based on the type name. This throws an exception when calling System.Web.Compilation.BuildManager.GetType. An exception:
Failed to load type 'DotNetNuke.Data.SqlDataProvider' from the assembly 'System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'
I read this to understand that he just could not find the assembly of DotNetNuke.SqlDataProvider.dll. What is strange is that the assembly is in the Bin folder for the DNN library project, and I also have it in the folder where my Windows service is running. The actual SqlDataProvider project is also loaded into the solution. I cannot understand why the runtime cannot find the assembly.
Has anyone tried something like this before or knew what could lead to the fact that the assembly will not be found when going through the DNN source? Am I better off using something other than BuildManager.GetType to get an instance of the SQL provider type?
source
share