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

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Problem Accessing ASPX pageProblem Accessing ASPX page
Previous
 
Next
New Post
11/22/2010 11:12 AM
 
I have created a couple of aspx web pages that I want in a directory under a portal. This was working fine until I upgraded to 5.6 of the community edition. Error is below. Is there a work around?

[NullReferenceException: Object reference not set to an instance of an object.] DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabID, PortalAliasInfo objPortalAliasInfo) +70 DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +2449 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +79 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +170
 
New Post
11/22/2010 10:37 PM
 
Lots of similar errors during upgrade were here. Try with this one solution: http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/107/postid/396574/scope/posts/Default.aspx#396574

Papayas DnnAutoUpgrade - automatic DotNetNuke upgrade without any problems!
www.papayasdnn.com
 
New Post
11/23/2010 12:21 PM
 
I'm having the same problem and that link seems to address something different. I updated to v. 5.6 and most of my pages still work, but there are a few aspx pages on my site that I've created separate from the DNN hierarchy. Those pages throw the error below. Also, I have some DNN pages that use AJAX to call an ascx server control to inject content which get the same error. I don't know how this is related, but the error is the same.

The DNN event viewer displays the following:
AssemblyVersion: 5.6.0
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL: /centers/cusli/niagara/test2.aspx
AbsoluteURL: /centers/cusli/niagara/test2.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 4553d0d0-462e-44c1-9aab-4acbef00a645
InnerException: Unhandled Error:
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Entities.Portals.PortalSettings..ctor
StackTrace:
Message: System.Exception: Unhandled Error: ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabID, PortalAliasInfo objPortalAliasInfo) at DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --- End of inner exception stack trace ---
Source:
Server Name: LAXXXXX

It seems that DNN isn't able to access portal info for these pages?

Windows event viewer reports it this way as an asp.net error with event id 1309:

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 11/23/2010 11:24:50 AM
Event time (UTC): 11/23/2010 4:24:50 PM
Event ID: 490f244f7c5446999e77351966ac0b65
Event sequence: 2
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/XXXXX/Root-2-129350030851374183
Trust level: Full
Application Virtual Path: /
Application Path: E:\xxxxxxxx\Website\
Machine name: LAXXXX
Process information:
Process ID: 3060
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

Request information:
Request URL: http://xxxxx/centers/cusli/niagara/te...
Request path: /centers/cusli/niagara/test2.aspx
User host address: xxx.xx.xx.xx
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabID, PortalAliasInfo objPortalAliasInfo)
at DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

does anyone have any suggestions?

 
New Post
11/23/2010 1:05 PM
 
@Carl and @Dave --

DNN 5.06.00 introduced a number of changes to the On_BeginRequest method of the URLRewriteModule to support the automatic mapping of Portal Aliases. Unfortunately, these changes to be causing two different but closely related issues:

1. If image files of extension other than .jpg and .gif are mapped to an ASP.Net handler or if the attribute runAllManagedModulesForAllRequests="true" is added to the <modules> node of the <system.webServer> section of web.config (IIS 7 and 7.5 only), these image files (most notably png files in the skin) will not be rendered and their paths will be added as additional portal aliases.

2. In some cases (not entirely sure which ones), urls for custom .aspx files that do not include either tabid or portalid in the querystring will not be accessible and the error that you are seeing in the EventLog will be thrown.

Both issues result in failure of the new UrlRewriteModule code to determine the correct PortalAlias (null in issue #2 resulting in the null reference error when an attempt is made to create the PortalSettings object.

Although I have not had a chance to test it today, I think a possible work around for issue #2 until the new code is fixed in a later version is to include the PortalID in the query string when redirecting to a custom aspx page, i.e ?portalid=0. I know that will not be possible in all cases or if one browses directly to the custom aspx page.

Also, do you custom aspx pages already inherit from either DotNetNuke.Framework.Pagebase or from DotNetNuke.Framework.CDefault ?

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/23/2010 3:20 PM
 
Bill,

Thanks for the reply, which sounds like a reasonable explanation. 

I'm running IIS 6, so I don't think #1 applies to me, so that leaves me with #2.

I tried passing portalid=0 on the querystring but it didn't change anything. The DNN log viewer still showed PortalID: -1. I'm not sure if that's due to inheritance or not. I tried inheriting from PortalModuleBase originally, then tried Pagebase and CDefault at your suggestion, but those didn't change the outcom. I could mis-type the inherited class or the using statement and it still wouldn't matter. It doesn't seem like .net ever gets to those lines of code.

I think I'm going to have to wait for 5.06.01
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Problem Accessing ASPX pageProblem Accessing ASPX page


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