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...Administration ...Administration ...URLRewrite causing problem with custom ASPX pageURLRewrite causing problem with custom ASPX page
Previous
 
Next
New Post
1/8/2011 9:30 PM
 
I recently upgrade DNN. Now an ASPX file that I had created to dynamically generate images id not working. I suspect URLRewrite.

The ASPX file is placed in the root of my portal. It is a child portal if that matters.

Here is the error. How can I keep any of the DNN stuff from running on this page?

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: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.] DotNetNuke.Entities.Portals.PortalSettings..ctor(Int32 tabID, PortalAliasInfo objPortalAliasInfo) +49 DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +2087 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
 
New Post
1/10/2011 9:14 PM
 
Actually I believe this is a bug in 5.6.0 that is resolved in 5.6.1. You might test the Beta out to see if it addresses your issue. The beta isn't meant for production just yet though. I believe the full release is coming next week.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
1/10/2011 9:37 PM
 
Thanks for the info. I will probably wait for the stable release.
 
New Post
1/20/2011 4:19 PM
 
I just upgraded and it didn't fix my problem. The error is different now however.

Here is the site in question:
http://www.fish4him.net/bh/
It is a child domain which is actually portal 9

On the site the wallpaper image thumbnails are generated by this aspx page.
http://www.fish4him.net/portals/9/wp.aspx

As in this full link as an example:
http://www.fish4him.net/portals/9/wp....

This is the error I now get.


DotNetNuke Error



Domain Name www.fish4him.net/portals/9 Does Not Exist In The Database 

DotNetNuke supports multiple portals from a single database/codebase. It accomplishes this by converting the URL of the client browser Request to a valid PortalID in the Portals database table. The following steps describe the process: 
 
New Post
2/7/2011 10:56 PM
 
I just found your answer - via Bill Severance:

William Severance wrote:
Unfortunately, that issue is still present in 5.06.01 and has been reported in Gemini as issue DNN-14871. Please check in Gemini for its current status and in particular analysis and a possible temporary workaround by Brandon Haynes.

I encountered it the other night while testing a WCF service (.svc file extension) I was developing for MediaGallery5 so its impact goes well beyond linking to .aspx pages.

...and here is Brandon's workaround:

Brandon Haynes wrote:
This issue is caused in UrlRewriteModule.vb, on or about line 456.

In prior versions, the requested URI leaf would be compared against the glbDefaultPage value ("Default.aspx"); if the request was not for this page, then rewriting would terminate. In 5.4.2 this code read:

If Not Request.Url.LocalPath.ToLower.EndsWith(glbDefaultPage.ToLower) Then
' allows requests for aspx pages in custom folder locations to be processed
Exit Sub
Else
...
End If

This check is absent in the 5.6.1 version, presumably due to the fact that we want to perform some automatic mapping for requests that may not end in this value. Requests not processed by ASP.NET are, obviously, unaffected.

However, as the person herein noted, this is a breaking change for those applications that serve requests for pages outside of DNN; these include, in addition to ASPX pages, WCF services (SVC), and old-school services (ASMX).

This issue is magnified by the fact that the default behavior is to issue a 404 for such requests, which is confusing since the resources do in fact exist.

A workaround exists for installations that have some location flexibility; resources may be maintained anywhere in any of the { "admin", "controls", "desktopModules", "mobileModules", "premiumModules", "providers" } directories so long as the URI that precedes the directory is a valid alias.

Suggest allowing for a configurable list of extensions and/or paths that are omitted from rewriting; such a list should be extendable by hosts.

 
The long and short of it: until they fix it in DNN, move your image generator into your controls ( or other above listed ) folder.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...URLRewrite causing problem with custom ASPX pageURLRewrite causing problem with custom 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