Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Problem with no code Module Package
Previous Previous
 
Next Next
New Post 6/16/2008 6:30 AM
User is offline belitre
4 posts
10th Ranked


Problem with no code Module Package 

I've created a module package following the instructions in this web. The module just shows a label. It works correctly in localhost but it doesn't when I build a "no code" version and try to deploy to a server.

If I'm not authenticated, the label of the module is showed, but also an error: "An error has occurred. Error: ModuleName is currently unavailable." is shown.

When I login as host, I get the following exception:

Error: Etiqueta Mágica is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Tracasa.Modules.EtiquetaMagica.EtiquetaMagicaController.AddEtiquetaMagica(EtiquetaMagicaInfo objEtiquetaMagica) at Tracasa.Modules.EtiquetaMagica.ViewEtiquetaMagica.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

I've realised that when the module is added to a page, the module table is not updated, i.e. Id doesn't insert a new record, what seems to be the problem. But the table and the stored procedures are correctly executed.

What could be happening?

Thanks for your attention.

P.D. I wanted to attach the files but this is not posible, Right?

 
New Post 6/18/2008 2:55 PM
User is offline belitre
4 posts
10th Ranked


Re: Problem with no code Module Package 

Could this error be connected with DotNetNuke version?

Have some of you got to develop a module and to deploy it with just compiled code?

Best regards.

 
New Post 6/19/2008 2:04 AM
User is offline Dario Rossa
358 posts
www.dariorossa.it
8th Ranked




Re: Problem with no code Module Package 

Hi belitre,

the error you reported doesn't look related to the DNN version, but to an exception raised by the addEtiquetaMagica procedure that is run during the Page_Load. Could you post  the code you are using in both these procedures?

Best regards,
Dario Rossa


Dario RossaDario Rossa
Personal WebSite: http://www.dariorossa.it
DotNetNuke: http://dotnetnuke.dariorossa.it
 
New Post 6/19/2008 4:55 AM
User is offline belitre
4 posts
10th Ranked


Re: Problem with no code Module Package 

Page_Load:

        protected void Page_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    if (((string)Settings["template"] != null) && ((string)Settings["template"] != ""))
                        strTemplate = (string)Settings["template"];
                    else
                        strTemplate = Localization.GetString("Template.Text", LocalResourceFile);

                    EtiquetaMagicaController objEtiquetaMagicas = new EtiquetaMagicaController();
                    List<EtiquetaMagicaInfo> colEtiquetaMagicas;

                    //get the content from the EtiquetaMagica table
                    colEtiquetaMagicas = objEtiquetaMagicas.GetEtiquetaMagicas(ModuleId);

                    if (colEtiquetaMagicas.Count == 0)
                    {
                        //add the content to the EtiquetaMagica table
                        EtiquetaMagicaInfo objEtiquetaMagica = new EtiquetaMagicaInfo();
                        objEtiquetaMagica.ModuleId = ModuleId;
                        objEtiquetaMagica.Content = Localization.GetString("DefaultContent", LocalResourceFile);
                        objEtiquetaMagica.CreatedByUser = this.UserId;
                        objEtiquetaMagicas.AddEtiquetaMagica(objEtiquetaMagica);

                        //get the content from the EtiquetaMagica table
                        colEtiquetaMagicas = objEtiquetaMagicas.GetEtiquetaMagicas(ModuleId);
                    }

                    //bind the content to the repeater
                    lstContent.DataSource = colEtiquetaMagicas;
                    lstContent.DataBind();
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }

        }

AddEtiquetaMagica at EtiquetaMagicaController.cs

        public void AddEtiquetaMagica(EtiquetaMagicaInfo objEtiquetaMagica)
        {
            if (objEtiquetaMagica.Content.Trim() != "")
            {
                DataProvider.Instance().AddEtiquetaMagica(objEtiquetaMagica.ModuleId, objEtiquetaMagica.Content, objEtiquetaMagica.CreatedByUser);
            }
        }

AddEtiquetaMagica at SQLDataProvider.cs

        public override void AddEtiquetaMagica(int ModuleId, string Content, int UserID)
        {
            SqlHelper.ExecuteNonQuery(ConnectionString, GetFullyQualifiedName("AddEtiquetaMagica"), ModuleId, Content, UserID);
        }

Stored Procedure at 01.00.00.SqlDataProvider:

create procedure {databaseOwner}{objectQualifier}Tracasa_AddEtiquetaMagica

    @ModuleId       int,
    @Content        ntext,
    @UserID         int

as

insert into {objectQualifier}Tracasa_EtiquetaMagica (
    ModuleId,
    Content,
    CreatedByUser,
    CreatedDate
)
values (
    @ModuleId,
    @Content,
    @UserID,
    getdate()
)

GO

Best regards.

 
New Post 6/19/2008 9:22 PM
User is offline Michael Washington
2842 posts
ADefWebserver.com
5th Ranked










Re: Problem with no code Module Package 

It looks like the table "Tracasa_AddEtiquetaMagica" is not there. Perhaps the script to create it has not been run?



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Problem with no code Module Package
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com
BataviaSoft DotNetNuke Solutions
BataviaSoft offers custom DotNetNuke solutions especially for the European and the South East Asian market.
www.bataviasoft.com
Viva Portals, L.L.C.
Expert module development and graphic design.
www.continure.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP