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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryRepository throwing Server Error in / ApplicationRepository throwing Server Error in / Application
Previous
 
Next
New Post
1/6/2011 3:09 AM
 

I have 2-3 instances of Repository modules on the same website and they work fine except the one on this page. Please let me know how to fix it. 

DNN - 5.6 and latest Repository module. Thank you.

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.] DotNetNuke.Modules.Repository.Helpers.ConvertToRoles(String RoleIDs, Int32 PortalID) +187 DotNetNuke.Modules.Repository.Repository.CheckItemRoles() +101 DotNetNuke.Modules.Repository.Repository.Page_Load(Object sender, EventArgs e) +2487 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 [PageLoadException: Object reference not set to an instance of an object.] DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(Exception exc, String URL) +269 DotNetNuke.Framework.PageBase.OnError(EventArgs e) +393 System.Web.UI.Page.HandleError(Exception e) +84 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6776 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242 System.Web.UI.Page.ProcessRequest() +80 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.default_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronousl
 
New Post
1/6/2011 3:16 AM
 
More from the event log: UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider ExceptionGUID: cd00f754-fd5d-49f4-b512-107904a52362 InnerException: Unhandled Error: FileName: FileLineNumber: 0 FileColumnNumber: 0 Method: DotNetNuke.Modules.Repository.Helpers.ConvertToRoles StackTrace: Message: System.Exception: Unhandled Error: ---> DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Modules.Repository.Helpers.ConvertToRoles(String RoleIDs, Int32 PortalID) at DotNetNuke.Modules.Repository.Repository.CheckItemRoles() at DotNetNuke.Modules.Repository.Repository.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(Exception exc, String URL) at DotNetNuke.Framework.PageBase.OnError(EventArgs e) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --- End of inner exception stack trace --- Source: Server Name: VPS035
 
New Post
1/6/2011 10:17 AM
 
Based on the error shown, I would guess that when you setup that particular repository instance, you checked off a role in the settings page, and subsequently removed that role.
To fix the error, try adding the role back, or use SQL to look at the module settings for that particular instance and remove the role from the settings record.
 
New Post
1/6/2011 5:13 PM
 
That sounds right. I have removed some roles. How do I look at the SQL for module settings for that particular instance and remove the role from the settings record?
 
New Post
1/10/2011 2:37 PM
 
First you need to get the Module ID of the repository instance.  The easiest way is to go to the module settings and look at the URL

You'll see something like this

http://www.yourdomain.com/Downloads/tabid/100/ctl/Module/ModuleId/920/Default.aspx

The 920 in this example which follows the ModuleId parameter is the number you need

Login using the Host account, then go to the Host->SQL page
enter the following SQL into the textbox and click Execute

select RoleID, RoleName from Roles

That will give you a list of your existing Security Roles and their IDs. For example:

RoleId RoleName
0 Administrators
1 Registered Users
2 Subscribers

Now, clear the text box and enter the following, then click Execute

select SettingName, SettingValue from ModuleSettings where SettingName like '%roles' and ModuleId = 920

of course, replace 920 with the Id of your repository instance Id

That will show you the settings for that particular module instance that relate to roles

You'll see something like this...

SettingName SettingValue
commentroles ;-1;0;
downloadroles ;-1;0;3;
moderationroles ;0;
ratingroles ;-1;0;
uploadroles ;0;

Now, look for a value that doesn't exist in your roles table.  In this example, if you look back at the Roles table, I only have 3 roles 0, 1 and 2. But if you look at the settings for my module, in the downloadroles setting I see a value of 3, which doesn't exist. I need to remove that value.

Note that each value starts with a  ;  and ends with a  ;  and has a  ;  between each value, so to remove the 3 from the download roles, I would execute the following SQL

update ModuleSettings set SettingValue = ';-1;0;' where SettingName = 'downloadroles' and ModuleId = 920

and that will update my downloadroles and remove the 3, that should do it. You can run the 

select SettingName, SettingValue from ModuleSettings where SettingName like '%roles' and ModuleId = 920

SQL again to make sure everything looks good.  Make sure each of the roles listed in each of the roles settings exist in your Roles table.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryRepository throwing Server Error in / ApplicationRepository throwing Server Error in / Application


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