Hi all (my first post):
I am having an issue with my host provider and running DNN in an ASP.NET 2.0 Application subdirectory. I have been getting intermittent errors relating to security policy. After searching everywhere I found a few people in this forum have been having similar problems with hosting companies running apps in medium trust level.
I have tried to get help from the hosting company but getting nowhere....Rather than try and get anything changed with my host (they are mainly a bunch of furstrating idiots), I have moved all my DNN installation to the root as I have heard this may solve the issues. And during brief tests it appears to be working without the errors.
However in the scenario where I run any ASP .NET 2.0 apps the Host provider asks users to use a default.asp file to redirect the targettted web site to another directory. This can be handled by DNN for DNN sites. However the problem lies in the fact that I am also hosting several ASP (not .NET) sites on this hosting account and for those domains I need to redirect to a subdirectory. I can't use a default.asp file as the default.aspx takes precendence on the server. I have tried to rename the default.aspx and use default.asp code to redirect to it, while this works in the intital sense it breaks how DNN works and the DNN sites fail to load with errors.
With my limited understanding of ASP.NET and DNN (using the 4.3.1 RC at moment) I have tried to hack the code in the default.aspx.vb file with no luck.
I inserted this code in the default.aspx.vb file (in several places) without success. I have included this code just so you can see what I am trying to acheive.
Private Sub InitializePage()
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'++ REDIRECT TO OTHER NON DNN WEBSITES - ROD DINES - 23 JUNE 2006
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dim redirect_host As String = lcase(Request.ServerVariables("HTTP_HOST"))
Dim redirect_weburl As String = ""
' redirect to a site url not within DotNetNuke
select case replace(redirect_host,"www.","")
case "mydomain.co.uk","mydomain.com"
redirect_weburl="http://" & redirect_host & "/mydirectory_on_mydomain/default.asp"
end select
if redirect_weburl <> "" then
Response.Redirect(redirect_weburl, True)
end if
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I have also tried to use the friendlyURL process with no luck. Here is an excerpt of the changes I made to config/SiteURLS.config to attempt to do this. However the documentation on using this does not include any syntax help (or I cant find it). And I'm not sure it is even capable of doing what I need.
<RewriterRule>
<LookFor>*mydomain.com</LookFor>
<SendTo>~/mydirectory_on_mydomain/default.asp</SendTo>
</RewriterRule>
PLEASE! I would greatley appreciate it if anyone who understands how DNN 4.3.1 works, can please point me in the right direction to either implement a configuration change or to HACK the source code. Please let me know specifically where in the source I should insert the above code and if need be how I should adapt it.
Thanks, Rod.