"Site Unavailable" when transferring to localhost
Last Post 03/23/2011 6:40 PM by Joseph Craig. 12 Replies.
Author Messages
Bang! Softworks
Nuke Newbie
Nuke Newbie
Posts:3


--
12/07/2007 3:16 PM  
I am transferring a hosted DNN site to localhost and followed the instructions in Issue 22, but when I go to run the site, it just goes to "This site is currently Unavailable".

What causes DNN to bring up this page?  I know my DB connection strings are good, I have changed the portal alias.  I am connecting to a SQL server on my internal network, so it is not on the same machine as the DNN files, but like I said before, my connection string is fine - I used it to install a blank copy of DNN on the same machine, and it works.

If I could know what causes DNN to redirect to the "unavailable" page, then I could troubleshoot it a bit better.
Joseph Craig
DNN MVP
Posts:11667


--
12/07/2007 4:21 PM  
Usually, this really does mean that there is something wrong with the connection string or with the database. Something is wrong such the DNN can't provide a more descriptive error message. What is the url of the page that is displayed? Is it a generic IIS error page, or is it a DNN page? Knowing that might help.

Make sure that BOTH connection strings are correct.

Joe Craig, Patapsco Research Group
Complete DNN Support
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
12/10/2007 3:45 AM  
I had  the same problem recently and it was due to the hosting provider not resetting the permissions on the database correctly after restoring the backup to the SQL server.

I checked this by entering the database login details into SQL Server and trying to view the database tables on the live site. - all I could do was login to the database but not actually view the tables, once permissions were set correctly, I could access all of the data using that login account and then my DotNetNuke installation could operate correctly.

Thanks,
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
andyb1979
Nuke Pro
Nuke Pro
Posts:63


--
05/05/2008 5:25 PM  

Sorry to ressurect a long-dead thread, but I just restored a live installation to localhost following the videos in Issue 22 and have encountered the same problem:

My URL redirects to http://localhost:81/rockrhymereason...uction.htm and I get the cryptic message that "This site is currently Unavailable"!

Ive just logged onto the live database via SQL Server Management studio and it seems there's no restriction to view the tables, so I dont know what/if any permissions have been changed.

I've checked both of my connection strings are correct, connectionString="Data Source=.\SQLExpress;Initial Catalog=mydatabase;User ID=myuser;Password=mypass;", I added a user/login to the database as per the videos and updated the portal aliases in the database.

I also added several portal aliases as I'm running IIS7 on Vista on port 81, so I have localhost and localhost:81/ aliases.

If anyone's seen this error before and has any ideas for me, please let me know!

Sites I made thanks to DNNCreative vids!
Rock Rhyme & Reason Fest | The Big Match | Calvary Stockport | Stephen Webster
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
05/06/2008 5:44 AM  
Have you successfully installed a fresh DotNetNuke installation to localhost? Just to test that IIS etc is setup correctly.
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
Joseph Craig
DNN MVP
Posts:11667


--
05/06/2008 8:31 AM  
You can also put an index.htm file in the web directory to see if IIS will serve it up. Also, if that works, try an App_Offline.htm file. This will only work if your site is compiling.

Yesterday at work I helped someone with that error. It turned out that the database connection string was wrong.

Also, when you get that error, refresh the page. Sometimes you'll get a more descriptive error.

Joe Craig, Patapsco Research Group
Complete DNN Support
Bang! Softworks
Nuke Newbie
Nuke Newbie
Posts:3


--
05/06/2008 8:45 AM  
What it was for me (and I suspect it may be for you) was an invalid portal alias.  You mentioned you added a bunch.  I added one and the format was wrong, once I corrected it, it worked properly.  Very frustrating problem - easy to fix.  I hope this helps.
andyb1979
Nuke Pro
Nuke Pro
Posts:63


--
05/06/2008 9:07 AM  
Hi everyone,

Thanks for the replies.

Yes I tried app_offline, originally it wouldnt even serve that, but some fiddling with the settings in IIS got it to display that. So I can view a default.htm or app_offline.htm file.

Im at work now, but my gameplan when I get home is to do as Lee said and try to install a fresh DotNetNuke site to another virtual directory.

Seems something is up. Im not sure about the portal aliases as I have several in there. Previously, I configured my PC to use the computer name as localhost so I could put myPC/dotnetnuke to navigate to the site (this way I could access the site via virtual PC instances with other IE versions).

So currently as aliases I have myPC/dotnetnuke, localhost/dotnetnuke and localhost:81/dotnetnuke for each portal! ..

I'll do a bit more detective work and let you know how I get on.

Cheers,
Andrew
Sites I made thanks to DNNCreative vids!
Rock Rhyme & Reason Fest | The Big Match | Calvary Stockport | Stephen Webster
andyb1979
Nuke Pro
Nuke Pro
Posts:63


--
05/06/2008 1:30 PM  
Right, I resolved it. Here are the steps I took:

1. DotNetNuke error "The site is unavailable" is shown

  •    as jncraig rightly pointed out, refreshing the page gives a more meaningful error
  •    The url I got was http://localhost:81/rockrhymereason...uction.htm
  •    Delete everything from /Install onwards and hit refresh. Then you see the exception:

2. Exception: An attempt to attach an auto-named database for file D:\Andrew\Work - Websites\RockRhymeReason\wwwroot\App_Data\rockrhymereason.mdf failed.
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

  •    Ok, so my connectino strings wrong. It thinks it should connect to a database in the App_Data dir, but I have the database on SQLExpress.
  •    I updated my connection string to point to the correct database

3. Another Exception now:


Exception: Cannot open database "rockrhymereason" requested by the login. The login failed.
Login failed for user 'andyb1979'.


  •  Deleted user and login for the database
  •  Added a new login for the server
  •     Set login username / password as in my connection string
  •     Checked "Enforce Password Policy", unchecked Enfore pass expiration
  •     set default database to master
  •     Under User Mapping, where it says Users Mapped to this Login, checked Map by the database I want a user for
      •  This step auto-creates a user for the login
      •  Under User Mapping, where it says Users Mapped to this Login, checked Map by the database I want a user for
      •  selected default schema to rockrhym
Now I click ok, navigate back to the localhost installation et voila! It works!

Thanks for your help guys
Sites I made thanks to DNNCreative vids!
Rock Rhyme & Reason Fest | The Big Match | Calvary Stockport | Stephen Webster
Joseph Craig
DNN MVP
Posts:11667


--
05/06/2008 8:01 PM  
I went through something similar to this at work today.

There were a number of errors that involved the wrong set of connection strings, the wrong database names, the wrong user and passwords, not fixing portalias table and ... drum roll ... having the IIS website configured incorrectly.

Whew!

Joe Craig, Patapsco Research Group
Complete DNN Support
Lee Sykes
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945


--
05/07/2008 3:30 AM  
LOL - yes its always one of those that catches us all out Joe!

Cheers,
Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/DNNCreative

Lee Sykes's Facebook Profile
Akita
Nuke Newbie
Nuke Newbie
Posts:1


--
03/23/2011 11:56 AM  
Having the same issue, but when I bring up localhost, it is automatically redirecting to /Install/Install.aspx. I am not doing an install, I have done the Issue 22 instructions to copy a production site to a local server but can't bring up the local site on the other server. I checked the portal aliases and the connection string. When I put a test page called index.htm in the root it does display for me. I am using A/D authentication on the site, don't know if that interferring or not. Any suggestions would be appreciated.
Joseph Craig
DNN MVP
Posts:11667


--
03/23/2011 6:40 PM  
Your site is redirecting to the install page because it's not connecting to the database. That it will display an index.htm file indicates that the DNS and part of IIS is working. But, so does the fact that DotNetNuke comes up and shows the install page -- actually that also shows that APS.NET is also configured correctly.

So, look at your connection strings and the configuration of the SQL Server.

Joe Craig, Patapsco Research Group
Complete DNN Support


---