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.0Exception error after adding new module to page - BUG & FIXException error after adding new module to page - BUG & FIX
Previous
 
Next
New Post
8/24/2006 5:11 PM
 
FYI, after I inserted my newly created module (dnn 4.3.4), I got the following error

Error: Vehicle Control 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 YourCompany.Modules.VehicleControl.ViewVehicleControl.lstContent_ItemDataBound(Object sender, DataListItemEventArgs e) in c:\Inetpub\wwwroot\DotNetNuke4Dev\DesktopModules\VehicleControl\ViewVehicleControl.ascx.cs:line 136 at System.Web.UI.WebControls.DataList.OnItemDataBound(DataListItemEventArgs e) at System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) at System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at System.Web.UI.WebControls.BaseDataList.DataBind() at YourCompany.Modules.VehicleControl.ViewVehicleControl.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\DotNetNuke4Dev\DesktopModules\VehicleControl\ViewVehicleControl.ascx.cs:line 115 --- End of inner exception stack trace ---

This is the same function in which I found an error earlier and reported in my earlier post!  I've tracked the error down to this function:

 protected void lstContent_ItemDataBound(System.Object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
        {
            string strContent = strTemplate;
            string strValue = Null.NullString;

            //add content to template
            strContent = (string)Settings["template"];
            ArrayList objProperties = CBO.GetPropertyInfo(typeof(VehicleControlInfo));
            int intProperty;
            foreach (PropertyInfo objPropertyInfo in objProperties)
            {
                if (strContent.IndexOf("[" + objPropertyInfo.Name.ToUpper() + "]") != -1)
                {
                    strValue = Server.HtmlDecode(DataBinder.Eval(e.Item.DataItem, objPropertyInfo.Name).ToString());
                    strContent = strContent.Replace("[" + objPropertyInfo.Name.ToUpper() + "]", strValue);
                }
            }

            //assign the content
            Label lblContent = (Label)e.Item.FindControl("lblContent");
            lblContent.Text = strContent;
        }

The code seems to have an extra line that messes everything up. 
  strContent = (string)Settings["template"]; After trying to figure out the strange c# syntax and why strContent would be reassigned two lines after being initilized, I just deleted it.  Problem solved.  This funciton needs to be fixed in the template when using c#!


 
New Post
8/24/2006 8:21 PM
 

HI

I just got this when I tried to put the Forum Module on to a page... My DNN is on a host server not local...

here is what I got...

 

Error: Media is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: An error has occurred
while establishing a connection to the server. When connecting to SQL Server
2005, this failure may be caused by the fact that under the default settings
SQL Server does not allow remote connections. (provider: SQL Network
Interfaces, error: 26 - Error Locating Server/Instance Specified) --->
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection
to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException
exception, Boolean breakConnection) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean&
failoverDemandDone, String host, String failoverPartner, String protocol,
SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean
trustServerCert, Boolean i

 

So any ideas anyone ?

Chhers for any help...

 
New Post
8/29/2006 11:56 PM
 
Yep.. that fixed my problem too. I did not even think to look above when it was delcared.  Thanks for the tip. Just saved me a headache
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Exception error after adding new module to page - BUG & FIXException error after adding new module to page - BUG & FIX


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