Mahadev Mahadev - 10 months ago 52
ASP.NET (C#) Question

Domain Name Does Not Exist In The Database DNN

I have a custom DotNetNuke website I am trying to setup on local machine.

I have already setup SQL 2012 database with db_owner credentials and SQL Authentication. Tested fine with SQL Server Management Studio. I have changed the directories security credentials for respective users.

Similarly changed PortalAlias tables' HTTPAlias columnn and PortalSetting tables' SettingPortal column for DefaultPortalAlias for website name (Local web server address ).

Also changed connectionstrings in ConnectioStrings and AppSettings sections.

Now I am getting

Domain Name Does Not Exist In The Database

error when I try to run my website.

How do I fix this?

Answer Source

Well, I solved this using help of my friend. There are some things which must take in considetaion while solving this issue.

  1. HostSettings : In database table named HostSettings, change AutoAddPortalAlias to Y. Although this change is optional, application will add the domain name into PortalAlias table.
  2. PortalAlias : If you use above HostSettings trick, application will automatically add PortalAlias but make sure to remove \ trailing domain name if there's any. Although this looks small change but keeping \ will create problem running application. Also create two entries with and without http. e.g. http://<domainName>.com and <domainName>.com.
  3. PortalSettings : Change DefaultPortalAlias to your domain name without the trailing \.
  4. Hosts : Create a entry in C:/Windows/System32/drivers/etc/hosts file for your domain name with IP Address : i.e. localhost

This changes are very similat to the question I asked but these small things does matter very much. No need to make any change in connectioString or Databse Connectivity options. This solved my problem completely.