2
votes

Howdy, I just installed dotnetnuke 5.06 on my server, say, the path is mydomain.com/dnn

I have a library independent of dotnetnuke that I have to run and it contains web services and various other httphandlers so I haven't tried to integrate it into DNN just yet. the library is located under mydomain.com/dnn/lib

The library worked fine on my old server running 5.04 and everything worked fine, but for some reason my new installation with 5.06 (windows 2008, sql server, iis 7.5) returns 404 when i try to access a page under mydomain/dnn/lib/, regardless of whether it's aspx, asmx...however images seem to work just fine, everything else either returns 404 or redirect to default.aspx in DotNetNuke. This has never happened before with my old site.

does anyone know what I'm missing here? any suggestion is be greatly appreciated.

2

2 Answers

0
votes

There's was an issue introduced in DNN 5.5 that blocks those files when they're outside of the DesktopModules folder. DNN 5.6.1 fixed that to some degree (I'm fairly sure that aspx works now), but not completely. Looking at the linked issue, it may help/fix to turn off automatic portal alias mapping in your Site Settings.

0
votes

Actually, the issue was fixed only in DNN 5.6.2, which is currently in beta. Version 5.6.1 still had this issue. There's a workaround that works in every situation: add the absolute url to your PortalAlias table. You'll have to do this by hand, because the Portals-tab doesn't allow aliases that root at the same level as an existing alias.

Another solution, if you can't wait for the new DNN version, includes adding the following code to the RequestFilterModule.vb and UrlRewriteModule.vb, which restores the existing behavior. This is not the fix that's applied to DNN 5.6.2, because programmers believe it is too much of a performance impact to check for file existence on every visit (which I consider odd, as several files are touched on every visit anyway, the main DNN cache uses file-based caching and in general, database access is slower than file access):

'Add this to the RequestFilterModule.vb (line #59)'
'and to UrlRewriteModule.vb (line #325)'
If File.Exists(app.Server.MapPath(Request.Url.LocalPath)) And Not _ 
   Request.Url.LocalPath.ToLower.EndsWith(glbDefaultPage.ToLower) Then

     'exit early when path is an existing path'
     Exit Sub
End If

Obviously, if you apply this fix, you have to be careful with the next update of DNN.