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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...error upgrading from 5.5.1 to 5.6.0error upgrading from 5.5.1 to 5.6.0
Previous
 
Next
New Post
12/14/2010 10:49 PM
 

I was able to reproduce the PNG issue, as well the issue where http:/exampledomain.com was getting the 500 error, without runAllManagedModulesForAllRequests in the web.config. The issue is indeed in DotNetNuke.HttpModules. PNG files as well as TXT files were failing with 404 errors.

Starting at line 324 in UrlRewriteModule.vb:

If Request.Url.LocalPath.EndsWith("scriptresource.axd", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("webresource.axd", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("gif", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("jpg", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("css", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("js", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("png", StringComparison.InvariantCultureIgnoreCase) _
        OrElse Request.Url.LocalPath.EndsWith("txt", StringComparison.InvariantCultureIgnoreCase) Then
    Exit Sub
End If

Items in red above were added

Also in RequestFilterModule.vb line 59:

If request.Url.LocalPath.ToLower.EndsWith("scriptresource.axd") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("webresource.axd") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("gif") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("jpg") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("css") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("txt") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("js") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("png") _
        OrElse request.Url.LocalPath.ToLower.EndsWith("txt") Then
    Exit Sub
End If

The above seemed to resolve the PNG and TXT issue.

I found another issue with the following line in UrlRewriteModule.vb on line 408:

' parse the Request URL into a Domain Name token 
 DomainName = GetDomainName(Request, True)

GetDomainName actual returns "exampledomain.com/", instead of "exampledomain.com". The domain name has trailing "/". This needs to be parsed out. If not, when used on GetPortalAliasByPortal or GetPortalAliasInfo a few lines down it fails.

So for line 408 I added:

 

       ' parse the Request URL into a Domain Name token 
DomainName = GetDomainName(Request, True)
'The domain name has trailing "/". This needs to be parsed out.
If Right(DomainName, 1) = "/" Then
       DomainName = Left(DomainName, Len(DomainName) - 1)
End If

 

 

The better answer would probably be to take a look at GetDomainName, but I did not know/look where else it was being used that might needed it.

Last but not least, around line 487 you see this:

 

If PortalId <> -1 Then
    ' load the PortalSettings into current context
    Dim _portalSettings As PortalSettings = New PortalSettings(TabId, objPortalAliasInfo)
    app.Context.Items.Add("PortalSettings", _portalSettings)

The problem here is that TabId is -1 when the user tries to go to exampledomain.com/ or exampledomain.com/default.aspx. I was a little stumped at the best thing to do, so I had to get the portalsettings by PortalId via this:

If PortalId <> -1 Then
    ' load the PortalSettings into current context
    Dim _portalSettings As PortalSettings
    If TabId = -1 Then
        'We have gotten this far, but there is a chance we do not have TabId
        'Tried this and it does not work.
        '_portalSettings = PortalController.GetCurrentPortalSettings()
        'will have to get portalsettings by Portalid
        'new settings object
        Dim ps As New PortalSettings()
        'controller instances
        Dim pc As New PortalController()
        Dim tc As New TabController()
        Dim pac As New PortalAliasController()
        'get the first portal alias found to be used as the current portal alias
        Dim oPortalAliasInfo As PortalAliasInfo = Nothing
        Dim aliases As PortalAliasCollection = pac.GetPortalAliasByPortalID(PortalId)
        Dim aliasKey As String = ""
        If aliases IsNot Nothing AndAlso aliases.Count > 0 Then
            'get the first portal alias in the list and use that
            For Each key As String In aliases.Keys
                aliasKey = key
                oPortalAliasInfo = aliases(key)
                Exit For
            Next
        End If
        'get the portal and correct TabId if available
        Dim portal As PortalInfo = pc.GetPortal(PortalId)
        If Not portal Is Nothing Then
            If portal.SplashTabId > 0 Then
                TabId = portal.SplashTabId
            ElseIf portal.HomeTabId > 0 Then
                TabId = portal.HomeTabId
            End If
        End If
        If TabId > -1 Then
            _portalSettings = New PortalSettings(TabId, oPortalAliasInfo)
        End If
    Else
        _portalSettings = New PortalSettings(TabId, objPortalAliasInfo)
    End If
    app.Context.Items.Add("PortalSettings", _portalSettings)

The above may not be the best way to do this, but I could not think of a better way to get portalsettings without a TabId. It seems to work correctly, but should be reviewed for efficiency.

I would be glad to submit the code changes, but could not find the Gemini issue if it existed.

Here is a zip with the changes I made, including the assembly:
http://www.vivoware.com/HttpModules-C...

 

 
New Post
12/15/2010 3:32 AM
 
please make sure, your finding get logged at support.dotnetnuke,com

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/15/2010 9:28 AM
 
I did not see an exact issue in Gemini with these problems, rather another one that is also fixed with the code changes above.
http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=14447&PROJID=2
 
New Post
12/15/2010 10:44 AM
 
I stuck a comment in here:
http://support.dotnetnuke.com/issue/V...

That issue is also fixed.
 
New Post
12/15/2010 6:21 PM
 
It appears that all the issues in this thread have been resolved in 5.6.1. Hopefully that will be released soon.

Will Morgenweck
VP, Product Management
DotNetNuke Corp.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...error upgrading from 5.5.1 to 5.6.0error upgrading from 5.5.1 to 5.6.0


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