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 AddModule Add
Previous
 
Next
New Post
2/24/2009 2:44 AM
 
Hi, I would like to create and add new module in my dotnetnuke project. I have create a module. but when try it to add it gives an error. The error is Error: mod1 is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The stored procedure 'dbo.YourCompany_Getmod1s' doesn't exist. ---> System.InvalidOperationException: The stored procedure 'dbo.YourCompany_Getmod1s' doesn't exist. at System.Data.SqlClient.SqlCommand.DeriveParameters() at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at YourCompany.Modules.mod1.SqlDataProvider.Getmod1s(Int32 ModuleId) at YourCompany.Modules.mod1.mod1Controller.Getmod1s(Int32 ModuleId) at YourCompany.Modules.mod1.Viewmod1.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace --- when i try add the manifest it gives error in web.config. it can not find the directory YourCompany.mod1. Any body can give me the proper way to create and add new module. Thanks in advance aAYn
 
New Post
2/24/2009 10:27 AM
 

Have you already updated your DNN database with the SQL code?

If you have done this, have you gone to the install new module page and used the import Module Definition?

 

-Joe

 
New Post
2/25/2009 8:49 PM
 

Hi all,

At least I'm happy I'm not the only one with this problem. Let me further explain my setup and all the details that end up to this error that hopefully is this situation is similar to what ayanroy123 is facing.

Setup:

DNN 5.0.0
VWD 2005 with DNN 5.0.0 starter kit wizzards.
SQL Server Express 2005
Data Provider: SqlDataProvider 
.NET Framework:  2.0.50727.

 

Procedure:

  1. Create and configure a DNN development environment (I will not cover this as it is straightforward).
  2. In VWD open your DNN site then right click on the project root folder and choose Add new item
    1. Select DotNetNuke Dynamic Module and give it a name (Hello3 in my case).
    2.   -Rename App_Code/ModuleName to App_Code/Hello3
    3.   -Rename DesktopModules/ModuleName to DesktopModules/Hello3
    4.   -Edit DesktopModules/Hello3/Hello3.dnn
      1.     -rename YourCompany.Hello3 to Hello3 in foldername element (This is a workaround in the wizzard otherwise the installation/import script, described below, will fail).
    5.   -Save all
    6.   -Build project and run
  3. -Login to DNN Portal as host
    1.   -Go to host->Module Definitions
    2.   - Select Import Module Definition
    3.   - From Manifest drop down choose Hello3.dnn and click Import Manifest

Important: The log installation is as follows

 StartJob Starting Installation
Info Starting Installation - Hello3
Info Starting Installation - Script
Info Begin Sql execution
Info Finished Sql execution
Info Component installed successfully - Script
Info Starting Installation - Module
Info Module registered successfully - Hello3
Info Component installed successfully - Module
Info Starting Installation - File
Info Component installed successfully - File
Info Starting Installation - File
Info Component installed successfully - File
Info Installation committed
Info Installation successful. - Hello3
Info Deleted temporary install folder
EndJob Installation successful.

-  Finally Now create a page and after that try to add Module Hello3

You will get this in the module section in your new created page:

Error: Hello3 is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The stored procedure 'dbo.YourCompany_GetHello3s' doesn't exist. ---> System.InvalidOperationException: The stored procedure 'dbo.YourCompany_GetHello3s' doesn't exist. at System.Data.SqlClient.SqlCommand.DeriveParameters() at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.DiscoverSpParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter, Object[] parameterValues) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at Microsoft.ApplicationBlocks.Data.SqlHelperParameterCache.GetSpParameterSet(String connectionString, String spName) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String spName, Object[] parameterValues) at YourCompany.Modules.Hello3.SqlDataProvider.GetHello3s(Int32 ModuleId) at YourCompany.Modules.Hello3.Hello3Controller.GetHello3s(Int32 ModuleId) at YourCompany.Modules.Hello3.ViewHello3.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

 

If instead of creating a DotNetNuke Dynamic Module you create DotNetNuke Simple Dynamic Module everything to the previous step will executed flawlessly and you will be able to see your module.

 

Now let's have a look what happens if you try to uninstall Hello3 module:

  1. In DNN go to Host->Module Definitions
  2. Locate Hello3 and click on X (Uninstall this extension)
  3. Click on Uninstall package and confirm the operation
    The uninstall log is as follows

    Package Uninstall Logs
     
    Info Reading Component Manifest - Script
    Info Reading Component Manifest - Module
    Info Module Manifest read successfully
    Info Reading Component Manifest - File
    Info Reading Component Manifest - File
    StartJob Starting Package Uninstall
    Info Starting Package Uninstall - Hello3
    Info Starting Component Uninstall - Script
    Info Begin Sql UnInstall
    Info Executing Uninstall.SqlDataProvider
    Info Start Sql execution: Uninstall.SqlDataProvider file
    Failure SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Cannot find the object "dbo.YourCompany_Hello3" because it does not exist or you do not have permissions. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at 
    ... (Output  truncated) ...
    Info End Sql execution: Uninstall.SqlDataProvider file
    Info End Sql UnInstall
    Info Component uninstalled successfully - Script
    Warning Component Uninstalled with Warnings - Script
    Info Starting Component Uninstall - Module
    Info Module un-registered successfully - Hello3
    Info Component uninstalled successfully - Module
    Info Component Uninstall Successful - Module
    Info Starting Component Uninstall - File
    Info Component uninstalled successfully - File
    Info Component Uninstall Successful - File
    Info Starting Component Uninstall - File
    Info Component uninstalled successfully - File
    Info Component Uninstall Successful - File
    Warning Uninstalled with Warnings - Hello3
    EndJob Uninstalled with Warnings
     
     

Ok from this my theory is simply DNN is not executing the SqlInstall script (in this case 01.00.00.SqlDataProvider) or something is wrong with Hello3.dnn from my understanding the later file defines the version correctly 01.00.00 and the Sql Script is in the same path as the Uninstall script but if you pay attention the install log (in red above) although it says it is executed Sql scripts it never says what files is actually executing (from what I see none), the uninstall log cleary states what script is executing (Info Start Sql execution: Uninstall.SqlDataProvider file )

Any ideas on what could be the cause of the problem?

Thanks,

Javier.

 

 

This is the Hello3.dnn file content as reference.

<dotnetnuke version="3.0" type="Module">
  <folders>
    <folder>
      <name>Hello3</name>
      <friendlyname>Hello3</friendlyname>
      <foldername>Hello3</foldername>
      <modulename>Hello3</modulename>
      <description>A Hello3 module</description>
      <version>01.00.00</version>
      <businesscontrollerclass>YourCompany.Modules.Hello3.Hello3Controller</businesscontrollerclass>
      <modules>
        <module>
          <friendlyname>Hello3</friendlyname>
          <cachetime>60</cachetime>
          <controls>
            <control>
              <src>DesktopModules/Hello3/ViewHello3.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
            <control>
              <key>Edit</key>
              <title>Edit Content</title>
              <src>DesktopModules/Hello3/EditHello3.ascx</src>
              <type>Edit</type>
              <helpurl></helpurl>
            </control>
            <control>
              <key>Settings</key>
              <title>Hello3 Settings</title>
              <src>DesktopModules/Hello3/Settings.ascx</src>
              <type>Edit</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
      </modules>
      <files>
        <file>
          <name>ViewHello3.ascx</name>
        </file>
        <file>
          <name>ViewHello3.ascx.vb</name>
        </file>
        <file>
          <name>EditHello3.ascx</name>
        </file>
        <file>
          <name>EditHello3.ascx.vb</name>
        </file>
        <file>
          <name>Settings.ascx</name>
        </file>
        <file>
          <name>Settings.ascx.vb</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>ViewHello3.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>EditHello3.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>Settings.ascx.resx</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>DataProvider.vb</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>Hello3Controller.vb</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>Hello3Info.vb</name>
        </file>
        <file>
          <path>[app_code]</path>
          <name>SqlDataProvider.vb</name>
        </file>
        <file>
          <name>01.00.00.SqlDataProvider</name>
        </file>
        <file>
          <name>Uninstall.SqlDataProvider</name>
        </file>
      </files>
    </folder>
  </folders>
</dotnetnuke>

 
New Post
2/26/2009 5:38 PM
 

As I stated in the first response, you did not run the SQL to create the tables.

Use the sql in the DesktopModules/Hello3 folder and paste it into the SQL window while logged in as host.  Make sure you select the run as script checkbox.

The problem is none of the stored procs have been created yet.

 
New Post
3/2/2009 12:33 PM
 

thats what I needed to see!  I have a .dnn module and when you use "Install Module" vs. "Import Module Definition" you get an error stating ".dnn" file wasn't recognized or something to that effect.  but when you run the sql, and then import module definition that worked...

Joe wrote

Have you already updated your DNN database with the SQL code?

If you have done this, have you gone to the install new module page and used the import Module Definition?

 

-Joe

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module AddModule Add


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