Search code examples
asp.netdotnetnuke

Copy DOTNetNuke site to new 1and1 shared hosting


Hope someone here has experience of this because I have no clue! Let me say from the start that I've got no experience with asp.net or DotNetNuke.

I've recently started up a small web hosting company to get some extra cash and I've got a client who wants to come on board. The current host of their website has provided me with the source files and a SQL Server db backup. The site was created using DotNetNuke.

I've restored the database and uploaded the source files, I also update the web config with the new connection details. I had hoped it would just work... but it didn't. I'm getting the following error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration 
data for the page is invalid.

The Config Source box on the error page has

-1;
0:

and the 0 is in red.

Hope some can help with this, not sure what info you need so I'll leave it there for now.

Thanks a lot.

Alex

**** Update ****

I can't install anything on the server because it's shared hosting with 1and1, I don't get direct access to the server. I'll contact 1and1 and make sure that URL rewriter is installed.

The web.config is too big to put the contents into the post. So here's a link to it:

web.config

Thanks in advance.

Cheers

Alex


Solution

  • It could be unrelated to DotNetNuke itself. Error 500.19 means that there is a problem with the web.config file, see IIS HTTP Error 500.19.

    First try to install the IIS URL rewriter (http://www.iis.net/downloads/microsoft/url-rewrite) on the server. That is the most common missing IIS plugin. If that does not work then post the web.config file so others can see and try to find the problem.

    UPDATE

    It is very likely the URL rewriter. Take a look at the web.config, lines 98 to 120. You will see the node.

    <rewrite>
        <rules>
            <rule name="LowerCaseRule1" stopProcessing="true">
                <match url="[A-Z]" ignoreCase="false" />
                <action type="Redirect" url="{ToLower:{URL}}" />
            </rule>
            <rule name="CanonicalHostNameRule1">
                <match url="(.*)" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^www\.test\.co\.uk$" negate="true" />
                </conditions>
                <action type="Redirect" url="http://www.test.co.uk/{R:1}" />
            </rule>
            <rule name="oldHome" stopProcessing="true">
                <match url="^index.html(.*)$" />
                <action type="Redirect" url="/" />
            </rule>
            <rule name="oldLodges" stopProcessing="true">
                <match url="^lodges.html(.*)$" />
                <action type="Redirect" url="/HolidayLodges.aspx" />
            </rule>
        </rules>
    </rewrite>
    

    You can remove it. It doesn't seem to be very important for the functionality of the website. Just some legacy stuff. Second DNN has its own URL rewriter and I've never seen them being used at the same time. It could only lead to problems if both rewriters are trying something similar.

    Also take a look at line 29, an Entity Framework connection string. Not sure why that is needed for DNN.

    <add name="newsellerdwebsiteEntities1" connectionString="metadata=res://*/Model.Database.csdl|res://*/Model.Database.ssdl|res://*/Model.Database.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=**;initial catalog=**;user id=**;password=**;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    

    And line 35, AutoUpgrade should ALWAYS be set to false, And to be sure there is no upgrade hack delete the InstallWizard.aspx, InstallWizard.aspx.cs, UpgradeWizard.aspx and UpgradeWizard.aspx.cs from the /Install folder. This only applies when the site is functioning.

    <add key="AutoUpgrade" value="true" />