Before I begin, I just want to say that the 4.6.2 release of DNN is the first in which I have had no installation problems on GoDaddy. If everything is set up correctly and the files are loaded into a sub directory, it runs just fine. With GoDaddy there are two issues. One is that the portal must be in a subdirectory you create or ASP.Net won't have the correct permissions. The second issue is how to redirect from the host root to the "portal" directory without having the user type the full path. So what is the best method to redirect. Personally, I clear out all the default files in the host root, create a subdirectory called "portal" on GoDaddy, and drop an aspx page called "default.aspx" in the host root to perform the redirection (listed below).
<%@ Page Language="vb"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Page_Load(ByVal Source As Object, ByVal E As EventArgs)
If Not IsPostBack Then
Response.Status = "301 Moved Permanently"
Response.Redirect("~/portal/default.aspx", True)
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
</body>
</html>
This is a search engine friendly way to redirect from the host root to the DNN installation (this can be important if your hosting multiple parent and child portals). Now this code runs fine and my DNN installation is stable. However, this really isn't the BEST method because it incurs a round trip from the server. So I would prefer to use this code instead.
Change - Response.Redirect("~/portal/default.aspx", True)
To - Server.Transfer("~/portal/default.aspx", True)
When I make this change the following error is produced.
Parser Error Message: The element 'codeSubDirectories' cannot be defined below the application level.
Source Error:
Line 96: </codeSubDirectories>
Line 97: -->
Line 98: <codeSubDirectories>
Line 99: <add directoryName="HTML" />
Line 100: <add directoryName="Reports" />
Line 96: </codeSubDirectories>
Line 97: -->
Line 98: <codeSubDirectories>
Line 99: <add directoryName="HTML" />
Line 100: <add directoryName="Reports" /> |
Source File: d:\hosting\ereckjohan\portal\web.config
Line: 98
So the transfer worked but DNN failed. If I change it back, all is well. So far, I have spent about a week on this because it is just bugging me and would appreciate any help. BTW - using a meta tag (as GoDaddy suggests) to redirect can create problems with multiple virtualized parent directories so don't do it.
As a note - there are some tricks to setting up child portals and parent portals and how things appear in the browser which I will discuss later. I am in the process of producing a guide on GoDaddy installations and configurations I will release soon. These are business as well as code issues.