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:
- Create and configure a DNN development environment (I will not cover this as it is straightforward).
- In VWD open your DNN site then right click on the project root folder and choose Add new item
- Select DotNetNuke Dynamic Module and give it a name (Hello3 in my case).
- -Rename App_Code/ModuleName to App_Code/Hello3
- -Rename DesktopModules/ModuleName to DesktopModules/Hello3
- -Edit DesktopModules/Hello3/Hello3.dnn
- -rename YourCompany.Hello3 to Hello3 in foldername element (This is a workaround in the wizzard otherwise the installation/import script, described below, will fail).
- -Save all
- -Build project and run
- -Login to DNN Portal as host
- -Go to host->Module Definitions
- - Select Import Module Definition
- - 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:
- In DNN go to Host->Module Definitions
- Locate Hello3 and click on X (Uninstall this extension)
- 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>