Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access content of a DotNetNuke portal?

Tags:

dotnetnuke

Total noob question on DotNetNuke, using it for first time.
My client gave me a dump of his website (made in DNN) and he wants to host his site with me.

He has a list of portals. I would like to know how I can view one in localhost.
I have created a DotNetNuke application in my local IIS that points to the code my client gave. This folder has DotNetNuke.webproj file.

Inside Portals directory I got a folder named StackMe, for example. How do I access that portal?

When I browse to http://localhost/DotNetNuke/ it redirects to http://localhost/DotNetNuke/Install/UnderConstruction.htm

like image 471
Null Head Avatar asked Dec 09 '22 06:12

Null Head


2 Answers

If it's redirecting to Under Construction, the site probably isn't able to reach the database. DotNetNuke isn't going to be able to display anything without a connection to the database. You might get more information if you try to hit http://localhost/DotNetNuke/Install/Install.aspx?mode=none

The mapping of a portal to a URL is handled in the PortalAlias database table. You should just be able to add your localhost URL to that table, and then be able to access the site (once the site can hit the database). If the site has multiple portals, you'll need to add an alias for each portal you want to access.

like image 123
bdukes Avatar answered Dec 11 '22 19:12

bdukes


If you're seeing the under construction page, something's amiss (captain obvious here).

Some steps to help troubleshoot on your local machine:

  1. Turn custom errors off in the web.config. Just so you can see any ASP.NET errors if they bubble up.
  2. Ensure that DotNetNuke is able to connect to your database. There's two places you need to check in the web.config file.
    • In <connectionStrings>, check the <add name="SiteSqlServer" ... /> element.
    • in <appSettings> check the <add name="SiteSqlServer" ... /> element.
  3. In your SQL database, find the DNN tables. The table you're interested in will be named "PortalAlias" (or "dnn_PortalAlias" or whatever your table prefix is). Each portal is mapped to a URL. If DNN detects you've arrived at the site using a URL it doesn't recognize it will forward you to one that is does recognize.
    • Run a SQL query and see what's in PortalAlias (run a select *). Make note of the Portal ID.
    • Insert a new record into the table. INSERT INTO PortalAlias (PortalID, HttpAlias) VALUES (<YourPortalID>, 'http://yoururl')
    • Restart the site by restarting the app pool or resetting IIS
      1. Check IIS and ensure that your site is running with the correct permissions.
      2. Check IIS and ensure that the site App Pool is running the correct .NET Framework version.

If all that fails...

I have had limited success is renaming the Install directory to something else, say _Install and hitting the site again so that I can see what the ASP.NET error is. After I get the site running again I revert it to its original name.

Good luck!

like image 21
JonH Avatar answered Dec 11 '22 18:12

JonH