I'm not sure how I did this. At one point I think I added a second site when I was learning DNN:
I have a second site that shows in settings > site settings and of course I can see it in my folder structure's portal folder. How do I delete it? It's not showing in manage > sites where I think you are supposed to be able to delete sites when you hover on them?
I have seen this for a site without Portal Alias. After I added that, I was able to delete it.
Posted By Agency3 on 12 Jul 2019 10:54 AM Thanks! I tried adding the alias back but I still couldn't delete it and it's still not showing in manage > sites. Very odd. I think really messed something up trying to clean up the web.config. It's definitely there because I can see it's directory and it's showing in the sql console when I run SELECT * FROM portals; Anyhow I think you're right Joe I will just ignore the database it and delete the directory after a backup
If you can get to the Portal, try saving the portal settings and see if that helps. I'm sure there's something missing in the DB, which makes the SQL to get the portal fail.
I added the alias back and now the site re-appeared in the manage > Sites. But if I hit delete I get an internal server error:
POST http://uat.workauthority....etePortal?portalId=1 500 (Internal ServerError) send @ jquery.js?cdv=230:11 ajax @ jquery.js?cdv=230:11 rawCall @ sf.js?cdv=230:89 call @ sf.js?cdv=230:100 post @ sf.js?cdv=230:104 value @ SitesListView.js?cdv=230:1 (anonymous) @ SitesListView.js?cdv=230:1 (anonymous) @ export-bundle.js?cdv=230:98 (anonymous) @ SitesListView.js?cdv=230:1 (anonymous) @ util.js?cdv=230:141 dispatch @ jquery.js?cdv=230:6 q.handle @ jquery.js?cdv=230:6
There are so many weird things going on. I can't set the primary site because there is no edit button beisde it. I cant toggle between auto add alias because the button is greyed out. Also when I select the site from the editing site dropdown at the top of the persona bar page, it doesn't properly refresh the alias listed. I have to flip between tabs to get it to refresh.
I know it will sound a bit odd, but you can't set the primary site alias when browsing it from the alias you wish to make it primary. For example, if you want your primary alias to be example.com and you're currently visiting on example.com, then you can't set that alias. You'd have to browse and do this from a different domain name. :)
As for the error you reported, that's a client-side error message. Do you happen to have the server-side error message as well? You can get that from the Admin Logs and/or the Log4Net log file in the /Portals/_default/Logs/ folder.
That's why I'm confused because now neither site is marked as primary. I'm guessing I shouldn't have tried to add a second site without adding the subdomain first through the webhost panel? (I now realize I don't have access to it and have to get IT to do it) Because I can't delete the site or log into it by visiting staging.workauthority.ca
Anyhow here is the server side error:
2019-07-21 15:52:50.221-04:00 [vserver243][D:85][T:125][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\inetpub\vhosts\uat.workauthority.ca\httpdocs' denied. ---> System.ComponentModel.Win32Exception: Access is denied --- End of inner exception stack trace --- at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode) at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo) at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter) at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath) at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId)
I just did a test on a local install and I managed to do the same thing again!
2019-07-21 16:47:08.055-04:00 [DESKTOP-OK4SJ8I][D:2][T:64][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\Users\DrFish\Documents\wa\Website' denied. ---> System.ComponentModel.Win32Exception: Access is denied --- End of inner exception stack trace --- at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode) at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo) at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter) at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath) at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId) 2019-07-21 16:49:23.517-04:00 [DESKTOP-OK4SJ8I][D:2][T:62][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.UnauthorizedAccessException: Access to 'C:\Users\DrFish\Documents\wa\Website' denied. ---> System.ComponentModel.Win32Exception: Access is denied --- End of inner exception stack trace --- at SchwabenCode.QuickIO.Internal.InternalQuickIOCommon.NativeExceptionMapping(String path, Int32 errorCode) at SchwabenCode.QuickIO.Internal.InternalQuickIO.GetFindDataFromPath(QuickIOPathInfo pathInfo) at DotNetNuke.Common.Utilities.FileSystemUtils.DeleteFilesRecursive(String strRoot, String filter) at DotNetNuke.Entities.Portals.PortalController.DeletePortal(PortalInfo portal, String serverPath) at Dnn.PersonaBar.Sites.Services.SitesController.DeletePortal(Int32 portalId)
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.